This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes POI 3.6: problem creating XSLX file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "POI 3.6: problem creating XSLX file" Watch "POI 3.6: problem creating XSLX file" New topic

POI 3.6: problem creating XSLX file

Samir Banerjee
Ranch Hand

Joined: Jun 21, 2010
Posts: 72
Hi Friends,
I have successfully upgraded my system to POI 3.6 and changed the code accordingly to support both xls and xlsx file formats. Now the xls files are parsed and exported properly by the code. But when it tries to open .xlsx type files it gives error :
Excel found unreadable content in report.xlsx.Do you want to recover the contents of the workbook? If you trust the source click yes.

Asks for yes or no and on doing yes. it says :
Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.

But the file opens properly after that and all field are rendered properly.
Can any one help me out why this problem is occurring. I am debugging the code but not able to find the main cause.
Note : I am using the same code for XSSF as well as HSSF with the help of common interface like Workbook,Sheet,Cell. and the calculations for finding the coordinates are same for both.
Thanks in advance.
Shreyaswini Kolali

Joined: Aug 02, 2011
Posts: 3

I am facing the same problem. Can you please let me know what was the solution used to overcome this?

It is sorta covered in the JavaRanch Style Guide.
subject: POI 3.6: problem creating XSLX file
Similar Threads
Opening an Excel file
response.setContentType not working in case of Excel
How to read excel2007 file or both .xls and .xlsx files using apache poi
Read a .xls,.xlsx file format using XSSF
Jakarta POI vs Jasper Reports.