Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
Saveing xls files are corrupt
Migrateduser
<p>[BIRT 4.2.2] - I am still having a problem with saving xls (excel) files. when I try to open the xls files I get his error:</p>
<pre class="_prettyXprint _lang-">
The file format and extension of 'export.xls' don't match. The file coould be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?
Yes, no, help
</pre>
<p>When I click yes I get a report with only one column, were as other file formats have 9 columns. Here is where I am setting the mimeType.</p>
<pre class="_prettyXprint _lang-">
String mimeType = null;
if (format.equals("xls")) {
resp.setContentType("application/vnd.ms-excel");
mimeType = "application/vnd.ms-excel";
}</pre>
<p>And here is where I am setting the render options.</p>
<pre class="_prettyXprint _lang-">
if (format.equalsIgnoreCase("xls")) {
options = new EXCELRenderOption();
options.setSupportedImageFormats("PNG;GIF;JPG;BMP;SWF;SVG");
options.setOutputFormat(format);
}
</pre>
<p>what am I doing wrong here?</p>
Find more posts tagged with
Comments
There are no comments yet