Bassi Gurpiar <Gurpiar.Bassi <at> aah.co.uk> writes:
>
> 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");
>
If you know number of digits try:
setDataFormat("00000000000") of class HSSFCellStyle.
Agata
Ps. In JExcel it works.
---------------------------------------------------------------------
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/