Hi,
I created a HSSFWorkbook from an excel file. I like to add more row to
existing sheet with the same style and formula ( if any). I followed the
same logic as RepeatingRowsAndColumns.java example. This did not work.
Then I tried to run RepeatingRowsAndColumns example class and got the
following:
Exception in thread "main" java.lang.NullPointerException
at org.apache.poi.hssf.model.Sheet.getSize(Sheet.java:2124)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:771)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:731)
at RepeatingRowsAndColumns.main(RepeatingRowsAndColumns.java:100)
Is this the way to add more row with existing style and formulas to a sheet?
I tried to save the cell style and formula with getCellFormular(), then use
it to create new cell with cell.setFormular(). The parser can not parse
some of the formulas. However, the entire excel workbook was loaded without
error??????
Thanks.
th.