poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Beardsley <markbrd...@tiscali.co.uk>
Subject RE: How to write the Formula of division with 2007 excel files and POI
Date Wed, 07 Mar 2012 16:54:35 GMT
The reason I asked that question is quite simple. Say you do this;

row = sheet.createRow(10);
cell = row.createCell(0);
cell.setCellValue("Test");

and then do this;

row.setRowNumber(20);

when POI comes to write the file out, it will not be able to create
correctly formed xml; it will try, not complain nor throw and exception.

I have not had the time to look through your code and so do not know if you
are doing this but it could - and that is *could* - be the source of the
error. I tried something similar myself as a test and Excel did issue a
warning when it tried to open the file. If you wanted to put the totals on
row 20 - for example - and row 20 did not yet exist on the sheet you should
create it first. If row 20 does already exist on the sheet then you have to
get the row from the sheet object.

As I said, I do not know if this is the source of your error but it just
struck me as strange to see the call to the setRowNumber() method without
any other context and that was the reason I asked.

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-write-the-Formula-of-division-with-2007-excel-files-and-POI-tp5528227p5544754.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message