mnabeelkhan / tableexport-for-vaadin

Automatically exported from code.google.com/p/tableexport-for-vaadin
0 stars 0 forks source link

NullPointerException with empty sheetName #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Found the bug. Stupid error.  Was setting this.sheetName correctly if sheetName 
param was null. But then used sheetName, not this.SheetName later on.  Renamed 
all parameters to be different than their global counterparts.

---

From post:

Using 1.2.9

If you use the constructor ExcelExport(table) you get a nullPointerException.

Caused by: java.lang.NullPointerException
at 
org.apache.poi.hssf.model.InternalWorkbook.doesContainsSheetName(InternalWorkboo
k.java:596)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.createSheet(HSSFWorkbook.java:775)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.createSheet(HSSFWorkbook.java:88)
at com.vaadin.addon.tableexport.ExcelExport.<init>(ExcelExport.java:200)
at com.vaadin.addon.tableexport.ExcelExport.<init>(ExcelExport.java:177)
at com.vaadin.addon.tableexport.ExcelExport.<init>(ExcelExport.java:156)
at com.vaadin.addon.tableexport.ExcelExport.<init>(ExcelExport.java:139)
at com.vaadin.addon.tableexport.ExcelExport.<init>(ExcelExport.java:125)
at com.vaadin.addon.tableexport.ExcelExport.<init>(ExcelExport.java:113)

It works if you specify a sheet name: ExcelExport(table,"my sheet")

Original issue reported on code.google.com by jnas...@gmail.com on 17 Mar 2012 at 10:17

GoogleCodeExporter commented 8 years ago
fixed

Original comment by jnas...@gmail.com on 18 Mar 2012 at 12:04