In Excel adding a leading apostrophe changes for instance dates to text and the 
apostrophe is not shown, except for in the formula line. (For example adding 
'29.11.2010 is shown as 29.10.2010 .)
 
I want to do this when using POI. When setting the cell value I add a 
apostrophe in front of a string which represents a date. But the apostrophe is 
shown when opening the resulting file in Excel. If I add a date manually in 
another cell in the same file the apostrophe is not shown.
 
Does the apostrophe trick not work with POI?
 
(Adding the dates as text by using a string or changing format of the cell to 
text isn't an option. By doing this the resulting file shows the dates as left 
aligned text, but I am importing the file to a third party software and in the 
resulting spreadsheet such cells are changed to the "Excel integer" the date 
represents. And manually changing the cell formats afterwards is not an 
option.) 
 
-Paal Larsen.                                     

Reply via email to