• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Umesh Kilkile
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20369
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should I assume you're talking about Apache POI? Or is it perhaps JExcelAPI? TellTheDetails!
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic