gordon613
gordon613

Reputation: 2952

ApachePOI generates org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException

I sometimes get the following exception when creating Excel sheets using Apache POI

ApachePOI generates org.apache.poi.POIXMLException: 
java.lang.reflect.InvocationTargetException

It often happens after a fairly simple code addition such as the one below:

Row myRow= CellUtil.getRow(1, xlsMainTable);
CellUtil.getCell(myRow, 10).setCellValue(d.getParamStr());

Therefore it can not be a problem with libraries not being installed properly.

Upvotes: 1

Views: 2759

Answers (1)

gordon613
gordon613

Reputation: 2952

This often happens to me if there is a null value in the setCellValue()

If you prevent setCellValue with being fed null values then this problem should go away.

Upvotes: 3

Related Questions