Bug 46748

Summary: Generated files cannot be read by Google or on BlackBerry
Product: POI Reporter: jdurrell
Component: HSSFAssignee: POI Developers List <dev>
Severity: major    
Priority: P2    
Version: 3.5-dev   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Sample generated file

Description jdurrell 2009-02-20 18:02:41 UTC
Created attachment 23285 [details]
Sample generated file

The .xls files created with the 3.5 beta cannot be read on BlackBerry or by Google applications.  Both Google's client on mobile and the "View as HTML" feature in Gmail report that file as corrupted.  Excel and Google Docs can read the file.

This can be reproduced with the simplest of files:
HSSFWorkbook wb = new HSSFWorkbook(); 
HSSFSheet sheet = wb.createSheet("test");
FileOutputStream fos = new FileOutputStream("/tmp/blah.xls");
Comment 1 jdurrell 2009-02-20 18:04:19 UTC
To be clear, the BlackBerry viewer cannot read the file either; the problem isn't limited to Google code.  Thanks.
Comment 2 David Fisher 2009-02-20 20:24:53 UTC
How did you send the xls to your device?

What mimetype does the gmail client report for the attachment?
Comment 3 jdurrell 2009-02-20 21:22:57 UTC
Thanks for jumping on this so quickly.

> How did you send the xls to your device? 

I've put the file on the device in multiple ways: an email attachment through both the Gmail client and the BlackBerry client, and via download through the browser.   To rule out transmission quirks, I confirmed that an Excel-generated file put on the device through the same methods works fine.

> What mimetype does the gmail client report for the attachment?

The Google client doesn't show a mime type that I could see, but the http headers in the download show:
Content-Type: application/vnd.ms-excel

One other point to clarify -- the testing with Google's "View as HTML" was done on a PC, not on a BlackBerry.  Actually, it's a server-side error from Google so the PC doesn't matter, but the important element is that I tried to make sure the problem wasn't BlackBerry-specific.  Otherwise I'd probably have filed the defect with RIM instead.  :-)
Comment 4 jdurrell 2009-03-17 13:38:12 UTC
Updated the platforms.  Excel files generated on Linux exhibit this problem, and readers on multiple platforms fail when accessing the files.
Comment 5 Dominik Stadler 2013-08-05 19:57:59 UTC
Current POI and current Google Mail work together well both with the simple sample file attached as well as with more complex documents produced by POI, I think this is fixed either on the side of POI or Google, sorry, but cannot test on BlackBerry.

I am resolving this for now, please reopen with fresh samples if it still does not work for you.