andruhon/android5xlsx

Open Excel File with Windows 7

Closed this issue · 2 comments

Hi,
thank you for your great work.
When I use Workbook wb = new HSSFWorkbook(); Windows 7 cannot open larger excel files create with this code (on android it works fine). But with Workbook wb = new XSSFWorkbook(); Windows 7 opens the created excel file. But bevor opening, windows 7 excel still displays a warning dialog: “The file format differs from the format that the file name extension specifies”
What can I do to get rid of this warning?
And sometimes, the created excel file opened with windows 7 is messed-up (non readable), but with excel on my android device, the file opens correct. Do you know why?
The issue (non readable) is solved. The reason was a cell value like this: String string = "";

My code is based on this tutorial: http://www.cuelogic.com/blog/creatingreading-an-excel-file-in-android/

Did you happen to name the file with .xls? For XSSFWorkbook it should be .xlsx.

Hi Dominik,
thank you :-). Changing the file extension to .xlsx while using XSSFWorkbook did the trick. Thank you guys for your great work!!!