Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

POI HSSF - Excel question

 
Chuck Mondi
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic