You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by wozmic <mw...@gmail.com> on 2008/11/26 15:31:20 UTC

XLS modification problem

Hi,

I was working on production until now with POI 2.5.1 (HSSF).
One thing we did was generating an Excel file based on an XLS model. In this
model, there was one sheet containing brut data, and one containing graphs
and other stuffs.
My program simply opened the model, injected the datas on the data sheet,
and then, I generated the output file. Very simple. And the user could open
the XLS file and get his graphics.

I switched to 3.1-FINAL and... It doesn't work anymore. I mean, the XLS file
is generated but when I open it with Excel, Excel crashes... When I launch
it again, it "repairs" the document. The data sheet is ok, but the sheet
with the graph (which I don't even touch in Java) is void...

Seems like POI 2.5.1 didn't impact objects it has not to work with (a sheet
containing a graph). But 3.1-FINAL seems to have an impact on all.

My model is attached here : 
http://www.nabble.com/file/p20701753/EssaiModifExcelSource.xls
EssaiModifExcelSource.xls 
My simple java sample : 
http://www.nabble.com/file/p20701753/EssaiModifExcel.java
EssaiModifExcel.java 

The sample simply opens the document, changes 5 values on the value sheet,
and saves the file in a different name.

As I mentionned, it works well on 2.5.1 but not on 3.1-FINAL.

Best regards,

Michel Wozniak
-- 
View this message in context: http://www.nabble.com/XLS-modification-problem-tp20701753p20701753.html
Sent from the POI - Dev mailing list archive at Nabble.com.


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


Re: XLS modification problem

Posted by wozmic <mw...@gmail.com>.
Hello Josh,

Thank you for your answer.
I was not very exhaustive in my last e-mail. Let me attach a few more files.
Just for info, I'm using Excel 2003, I don't have Excel 2007, that's why I'm
using HSSF.
I also tried with 3.5b3 (since I didn't find 3.5b4)

Here is the model Excel file that I want to modify (generated with Excel
2003) :  http://www.nabble.com/file/p20715514/EssaiModifExcelSource.xls
EssaiModifExcelSource.xls 

Here is the modified Excel file with POI 2.5.1-FINAL (working ok with Excel
2003) : 
http://www.nabble.com/file/p20715514/EssaiModifExcelDestination251.xls
EssaiModifExcelDestination251.xls 

Here is the modified Excel file with POI 3.1-FINAL (not working with Excel
2003) : 
http://www.nabble.com/file/p20715514/EssaiModifExcelDestination31.xls
EssaiModifExcelDestination31.xls 

Here is the modified Excel file with POI 3.5b3 (working with Excel 2003) : 
http://www.nabble.com/file/p20715514/EssaiModifExcelDestination35b3.xls
EssaiModifExcelDestination35b3.xls 

So you were right, there was a bug on 3.1 which is corrected on 3.5b3.

So for now, I suppose I'll have to stay on version 2.5.1 on our production
server. We are a big factory and no beta version can be used on production
environment. So I'll be waiting for version 3.5 final, I guess.

Thanks a lot for your help.

Best regards,

Michel Wozniak



Josh Micich wrote:
> 
> Hello Michael,
> 
> In my Excel (2007) your input file opens without any error or warning
> message, but the chart/rows/columns of the first sheet ('Vue') is/are
> not visible. I guess this is unexpected in the *input* since you wrote
> (about the output): "but the sheet with the graph (which I don't even
> touch in Java) is void".
> The POI code you supplied runs on the latest svn trunk without error,
> and the output file also opens in Excel without error message.  Again,
> the first sheet content is not visible.
> 
> So it may be the case that you are seeing a bug that was fixed since
> version 3.1, but it's hard to tell when I can't see the content of the
> first sheet.  Do you know how this input file was produced?
> 
> If you still experience problems with the latest version (3.5-beta4),
> please upload your copy of EssaiModifExcelOut.xls as produced by your
> POI 2.5.1 version, so we can do a BiffViewer comparison to understand
> the differences in behaviour.
> 
> regards,
> Josh
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/XLS-modification-problem-tp20701753p20715514.html
Sent from the POI - Dev mailing list archive at Nabble.com.


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


Re: XLS modification problem

Posted by Josh Micich <jo...@gmail.com>.
Hello Michael,

In my Excel (2007) your input file opens without any error or warning
message, but the chart/rows/columns of the first sheet ('Vue') is/are
not visible. I guess this is unexpected in the *input* since you wrote
(about the output): "but the sheet with the graph (which I don't even
touch in Java) is void".
The POI code you supplied runs on the latest svn trunk without error,
and the output file also opens in Excel without error message.  Again,
the first sheet content is not visible.

So it may be the case that you are seeing a bug that was fixed since
version 3.1, but it's hard to tell when I can't see the content of the
first sheet.  Do you know how this input file was produced?

If you still experience problems with the latest version (3.5-beta4),
please upload your copy of EssaiModifExcelOut.xls as produced by your
POI 2.5.1 version, so we can do a BiffViewer comparison to understand
the differences in behaviour.

regards,
Josh

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