> From: Daniel Noll [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 21, 2007 7:41 PM
> 
> Have you considered using a string value in those cells instead of a
> numeric
> value?  It might save you a lot of trouble.
> 
> Daniel

I'm not entirely sure what you mean. If you mean modifying the data in
the file so that it's treated as a string, that's not ideal, because I'd
like to avoid requiring modifications to the xls files themselves -
every added step per file is one less benefit from automation. I'll do
that if it comes to it, but I'd rather find a way in the program.

Is there a way to force HSSF to treat cells as strings even if they
contain numbers only? As I said, I tried using
style.setDataFormat(wb.createDataFormat().getFormat("@"));, but that did
not work. And according to the Javadoc for HSSFCell,
getRichStringCellValue() throws an exception for numeric cells.

Do you know of anything?

-Andrew

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to