 Okay, now we know that a CSV file contains data that consists of a bunch of fields separated by a comma. But the CSV file format is not fully standardized. The basic idea of separating fields with a comma is clear. But that idea gets complicated when the field data may also contain reserved characters such as comma, double quotes or less commonly new line character or carriage return character. Simple CSV implementation may prohibit field values that contain a comma or other special characters. So to get rid of that issue or to include that kind of reserved characters inside a cell, we will need an escape mechanism. In this video, we are going to learn how to use escaping characters around values that contain reserved characters. Now let's jump into the demo and take the example from the previous video where we extracted some information from the PDF document in CSV format using pdf.co cloud API. Alright, so in the previous video, we have extracted some of the information such as account number, invoice number, company name, total amount or say invoice date, etc. in CSV format using pdf.co API. Now here one thing you note that this company name contain comma in the name. Now what happened if we put this name in CSV field? So let me copy this company name and let's add that in our CSV file. So here under company name header, let me paste our company name and let us save this file and now let us open this CSV file in Excel. So now as you can see that because of the comma in the company name, this ink word is shifted to the next column and because of this rest of the fields are also shifted to the right side. So now how to fix this issue? Well, it's very simple. Let's open this CSV file in text editor. So here what you need to do is in this company name, just add this value inside the double quotes like this. Let me save this file and now let us open in Excel. So now you can see that all column values are now resided in their respected header. And here in the company name, even if the comma inside the value, it is still in the correct column. So what happened here is once we embed the field inside a set of double quotes, Excel escaped these values and these double quotes are generally referred to as text qualifiers. All right. And next is what if my sale value contain this type of value, say in this description column. So here you can see that I have added the percentage in double quotes. So sometimes we need to put the double quote to define the string inside the string itself. So when we add double quotes, just as we did for this company name, then any literal double quotes in the actual data like these double quotes will have to be escaped to avoid it being read as one of the enclosing double quotes. So to fix this issue, there are two accepted ways of escaping double quotes in CSV file. One is using a pair of consecutive double quotes to denote one literal double quotes in the data. And the another way is by prefixing a double quote with an escape character such as backslash. So let me add the pair of consecutive double quotes over here like this. And let's rep this entire field in another double quote like this. Now let us save this file. And let's open this file in Excel. Yes, so now you can see that our field value is displaying a double quote in the description cell. So the basic rule is if the sale value contains a comma, new line, or double quotes, then the string value should be enclosed in double quotes. And second is any double quote character in the value should be escaped with another double quotes. So by placing two double quotes, Excel knows that we are escaping the second double quotes and that means this double quotes is now treated as literal.