Ran into this problem while working on "VA Paste Data":
(1) Save the following 4 rows to a file, say, test.data
column-1,column-2
1,"text-1"
2,"'text-2'"
3,"text'3"
(2) In the third row above, the value of the second column is: double-quote, single-quote, text-2, single-quote, double-quote.
(3) Open a FluidShell in ADS and go to the directory where test.data is saved.
(4) Execute csv2excel fluid command as:
csv2excel test.data
==> an Excel file, test.xlsx, is generated.
(5) Open the generated test.xlsx file and take a look the third row.
==> The leading single quote is missing.
ADS' csv parser parsed input correctly and passed 'text-2' to Aspose's Cell.setValue(Object); however, 'text-2' is saved as text-2' in Excel file.
Similarly, if a DB table's column value contains a leading single quote, then in Query Analyzer's Grid view, I can see that value is displayed correctly; however, if I click Excel icon and select 'View as Spreadsheet', the leading single quote is missing in the generated spreadsheet.
If fact, leading single quote is saved in Excel file but is not displayed in the cell because leading apostrophe has special meaning in Excel; the value returned from Aspose's Cell.getValue() will not include the leading single quote. In MS Office, I can edit the cell and escape the leading single quote with two single quotes, not sure if this is the right way to do it.
Issue #12524 |
Closed |
Completion |
No due date |
No fixed build |
No time estimate |
If fact, leading single quote is saved in Excel file but is not displayed in the cell because leading apostrophe has special meaning in Excel; the value returned from Aspose's Cell.getValue() will not include the leading single quote. In MS Office, I can edit the cell and escape the leading single quote with two single quotes, not sure if this is the right way to do it.