We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to remove double quotes in CSV file

Hi i was using ASPOSE.cells to import a CSV file into database, but i got ="" surround the value in each column in each row of the CSV file, when i open the CSV file by notepad, the format is like this
"="“PS0614-10A1"”","="“1"”","=""""","="“Black/Orange”"","="“Regular”"","="“Hua-Feng”"","="“Disney”"","=""""","="“2014 Qtr 2"”","="“6-Boys”"",

how do i just get the value instead of getting the value like =“PS0614-10A1” ?

Please see the attached screen shots then you will understand i am talking about and need your comments on how to figure it out?



Well the quotes would be there that surround the values because these are actually formulas. When you use “=” then you may either refer to a cell/range of cells or string value that should be surrounded by the quotes. You may confirm it in MS Excel.

However, you may try to set the quotes type to your desired needs if it works for you for your needs.

Sample code:

//Instantiate Text File’s Save Options
TxtSaveOptions options = new TxtSaveOptions(SaveFormat.CSV);

//Specify your desired quotes type here.
options.QuoteType = TxtValueQuoteType.Minimum;
workbook.Save(“e:\test2\outtest.csv”, options);

Thank you.