Hi,

I have an interesting issue that I could do with some help on. I had a look
through the mailing list, but there does not quite seem to be an answer.

I am reading a spreadsheet in and converting it to CSV for further
processing. The columns are a mixture of String and numeric. As an example:


sometext      57         0.1234
someother    2           0.1

When reading it in, column one triggers case HSSFCell.CELL_TYPE_STRING and I
process it no problem.

However the next two values causes me some grief because of formatting on
the excel sheet which I have no control over. the first row the value 57 is
formatted as a number and I read it in using HSSFCell.CELL_TYPE_NUMERIC. The
resulting text value is 57.0. The next row the number is formatted as text,
i.e., '2 and the result is 2 (Which is the desired result)

Is there a way to somehow change the cell style to be text before reading,
maybe even change the entire sheet to text?

It will be read-only processing.


-- 
Thanks
Des Hartman

Reply via email to