This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to convert .xls to .xlsx and vice versa using Apache POI api 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 » Java » Java in General
Bookmark "How to convert .xls to .xlsx and vice versa using Apache POI api" Watch "How to convert .xls to .xlsx and vice versa using Apache POI api" New topic
Author

How to convert .xls to .xlsx and vice versa using Apache POI api

Umesh Kilkile
Greenhorn

Joined: Mar 31, 2010
Posts: 11
My project allows its users to upload / download Excel sheets. But the problem is some users may be using Excel 2007(.xlsx) and some may 2003(.xls). So, what I did is when a client uploads .xls / .xlsx it should be converted to .xls and stored in server. When a client downloads the same should be converted to appropriate format.

I've successfully able to convert .xls to .xlsx and vice versa. But at some stage I'm unable to convert if the Excel file contains too many cellstyles and if the cell is spaned to cover multiple cells.

I hope you will help me to do this task i.e conversion of .xls to .xlsx. and vice versa..

Thank you with Regards
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

Should I assume you're talking about Apache POI? Or is it perhaps JExcelAPI? TellTheDetails!


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
I think it'd be a rather laborious process to code a complete converter using POI. Check out the JODConverter library (which uses OpenOffice in server mode).


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to convert .xls to .xlsx and vice versa using Apache POI api
 
Similar Threads
Reduce Excel XML file size
read an excel file in .xlsx format
Excel conversion tool.
how to convert a .xlsx to .xls file using poi
POI 3.6: problem creating XSLX file