× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Oh oh.... this wakes me up :-)

Long time ago, Scott sent this to me:

To conserve space, Excel will only include cells if they're not empty. The
empty cells are not saved to the file.

Therefore, you may get this error when trying to update a cell that's
empty in your spreadsheet. I suggest that you check it by coding
something like the following (untested):

cell = HSSFRow_getCell(row: 85);
if cell = *NULL;
cell = HSSFRow_createCell(row: 85);
endif;

Good luck

And it did help :-) Thanks

Leif
----- Original Message -----
From: "Scott Klement" <rpg400-l@xxxxxxxxxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Sent: 24. maj 2007 20:37
Subject: Re: poi excel


After calling getCell() make sure you check to see if the cell object is
*NULL. That'll mean that there's no cell in that particular column of
that particular row (it shows up as an empty cell on the screen in
Excel, but it's not actually stored in the file, because it'd waste disk
space storing empty cells).

If you get a *NULL, it means that there'snothing there. You can add a
new cell using HSSFRow_CreateCell(), or my hssf_text(), hssf_num(), etc
shortcuts if you want to add a cell at that position.

If you're only trying to read existing cells, it should be safe to skip
anything that's *NULL.

If you try to refer to the cell object after it returns *NULL, you'll
end up crashing the JVM.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.