File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes POI HSSF - Excel question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "POI HSSF - Excel question" Watch "POI HSSF - Excel question" New topic

POI HSSF - Excel question

Chuck Mondi
Ranch Hand

Joined: Oct 14, 2008
Posts: 31
I have an XML file generated from a PeopleSoft SQR that has a file extension of .xls. The file isn't truly a Microsoft .xls file and it can get very large depending on the amount of data in the spreadsheet. I wanted to know if it would be possible using the POI HSSF to read this XML based .xls file and resave it as a .xls file. I have tried doing this in Excel by opening my source file and resaving it. It dramatically decreases the file size. I didn't know if anyone was familiar with working with XML based Excel files.

My thinking is I could create a small Java application that would take the name of the file as an argument and simply open the file and resave it with the same file name. This would save it as a Microsoft .xls file, decrease the file size and make the end users a bit happier. Thanks.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39535
POI handles XLS files (as well as DOC, PPT and some others), but not XML files. Whatever Excel can do with it, POI can't.

Ping & DNS - updated with new look and Ping home screen widget
I agree. Here's the link:
subject: POI HSSF - Excel question
Similar Threads
reading an xls file with poi hssf
generate large XLS file using java
Java - COM Communication
Performance of POI-HSSF
Create Spreadsheet