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.
Come have lunch with me Arthur. Adventure will follow. This tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
|