cancel
Showing results for 
Search instead for 
Did you mean: 

POI getCell() with missing cell policy returning null pointer exception

SOLVED
Highlighted
New Contributor

POI getCell() with missing cell policy returning null pointer exception

Hello,

I am trying to create a groovy script to read from an excel sheet using Apache poi.

To handle null pointer exceptions when calling getCell(), i am calling it with the MissingCellPolicy CREATE_NULL_AS_BLANK, however, it is still triggering a null pointer exception.

 

I have attached a screenshot of my code. Any assistance to help resolve this issue would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
New Contributor

Re: POI getCell() with missing cell policy returning null pointer exception

Although i didn't get a response, i found a work around i thought i would share.

I think the issue is that, although it doesn't throw an error, the getCell MissingCellPolicy isn't fully supported by the compiler SOAPUI OS uses.

I used a combination of using the MissingCellPolicy and exception handling via nested try/catch statements to be able to achieve what i needed.

View solution in original post

1 REPLY 1
Highlighted
New Contributor

Re: POI getCell() with missing cell policy returning null pointer exception

Although i didn't get a response, i found a work around i thought i would share.

I think the issue is that, although it doesn't throw an error, the getCell MissingCellPolicy isn't fully supported by the compiler SOAPUI OS uses.

I used a combination of using the MissingCellPolicy and exception handling via nested try/catch statements to be able to achieve what i needed.

View solution in original post

New Here?
Join us and watch the welcome video:
Top Kudoed Authors