POI doesn't support for office 2007 .xslx format.
I am stuffing the data into the StringBuffer and sending it to the ServletOutputStream.
The content of the StringBuffer is the output of the query.
I thought that was an XML-based format? In which case it would be a text file.Originally posted by Peter Johnson:
The contents of an .xlsx file are binary...
That confirms my suspicion that you're not using POI. You will need to do that, if you want to accomplish your goal.
I thought that was an XML-based format? In which case it would be a text file.
I think that Sar would need to use POI only if he(?) is writing Java code to manipulate the spreadsheet. If he is interacting with the *.xlsx file contents only as a stream of bytes then POI is not required.
The file you are trying to open .xlsx is in a different format than specified by the file extension.
(By the way, I think Peter has misunderstood what you're trying to do, so I don't think what he said really applies here.)
Just display the results of the query in the excel file.
Opportunity is missed by most people because it is dressed in overalls and looks like work - Edison. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|