I was recommended to file this into Buzilla from someone on the POI User list. Note: The version I am using is POI 2.5 Final (which is not in the version list, so I chose 2.0 Final) -----Original Message----- From: Daniel Joshua [mailto:daniel.joshua@gridnode.com] Sent: Tuesday, 23 March, 2004 5:09 PM To: poi-user@jakarta.apache.org Subject: RE: Unable to use a template (xls) file containing a wmf graphic Hi, I encountered a similiar problem as Mathieu. (I did a search on the archives and realised I am not the only one) Let me state my exact scenario in hopes that my added details will help. I use POI to create Excel spreadsheets with dynamic data using a template (.xls) file. Previously, I was using and older version of POI [File size: 605 KB (620,262 bytes)] which worked fine. However, I recently upgraded it to POI 2.5 Final, and it started having problems. I been using the same test files for both versions (if anyone want a copy I can send it to you). What happen is that there was a graphic in my excel which caused the produced Excel file which could not be opened. Also, there was NO exceptions/errors thrown from POI. Later when I read the below post, I tried to remove the graphic and 'viola' it worked correctly. Has anyone an idea why this is happening? Any quick remedies? My system specs: ---------------- OS: Windows 2000 Server JRE: 1.4.1_02-b06 Excel 2000 (9.0.2720) Regards, Daniel -----Original Message----- From: mathieu . fretiere Subject: Unable to use a template (xls) file containing a wmf graphic Date: Thu, 04 Mar 2004 02:24:47 -0800 ---------------------------------------------------------------------------- ---- Hi, my web application creates an Excel sheet with HSSF. It reads first a template file (an xls file) containing a wmf (Windows Metafile) graphic. Sometimes it works fine, if I use a plain wmf (or emf) graphic. But if the wmf is more complex, Excel cannot read the generated file. This error message appears in a pop-up : "Impossible to read the file". It doesn't work either if I use a jpg or tiff graphic. Where does this issue come from ? Is the wmf file too big ? For information, I use : - Tomcat 4.1.18 - Windows 2000 - IE 6, Excel 2000 thanks, Mathieu
Created attachment 11001 [details] Excel file with graphic that caused the problem
I added the Excel file I used for testing POI 2.5 Final as an attachment. http://issues.apache.org/bugzilla/showattachment.cgi?attach_id=11001
Works as of 12Jan2007, Testcase added. http://issues.apache.org/bugzilla/show_bug.cgi?id=41366