I am having trouble storing a text value field with leading zeros when
using HSSF to write cells in an Excel 2002 sheet.
For example, I am trying to store 00000004578 in the cell using:
cell = row.createCell((short)0);
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
cell.setCellValue("00000004578");
The value gets stored correctly when I open up the excel sheet. But the
problem is, it has a error message next to it saying "Number stored As
Text". If I try editing this cell, i.e. just by clicking on and off the
edit panel on the tool bar, the leading zeros are lost.
Please can someone tell me how to get around this.
Gurps
************************************************************************
DISCLAIMER
The information contained in this e-mail is confidential and is intended
for the recipient only.
If you have received it in error, please notify us immediately by reply
e-mail and then delete it from your system. Please do not copy it or
use it for any other purposes, or disclose the content of the e-mail
to any other person or store or copy the information in any medium.
The views contained in this e-mail are those of the author and not
necessarily those of Admenta UK Group.
Admenta UK plc is a company incorporated in England and Wales
under company number 3011757 and whose registered office
is at Sapphire Court, Walsgrave Triangle, Coventry CV2 2TX
************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/