Hi,
I created a new xls file and added a short string to one of the cells manually (with
Excel application). Now, I want to add new rows to this xls automatically. Adding the
new rows works with no exceptions but when I try to open the file manually I get the
following error: "File Error. Some number formats may have been lost". What did I do
wrong??
B.T.W - when I open a NEW xls and write to them using the HSSF these error do not
occur.
This is a sample of my code:
FileInputStream input;
fs = new POIFSFileSystem(input = new FileInputStream(fileName));
wb = new HSSFWorkbook(fs);
sheet = wb.getSheet(sheetName);
wbName = new String(fileName);
row = sheet.getRow((short)rowNum);
HSSFCell cell = row.getCell((short)col);
if (cell == null)
cell = row.createCell((short)col);
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
cell.setCellValue(str);
//Close
FileOutputStream fileOut = new FileOutputStream(wbName);
wb.write(fileOut);
fileOut.close();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]