EXCELRenderOption exported xls file cannot open in MS Excel [message #1718274] |
Tue, 22 December 2015 03:10  |
Eclipse User |
|
|
|
hi all,
I am newbie.
Now i use EXCELRenderOption to export xls(Excel2003 format) file,
the file can be exported, but when I use MS Excel to open the xls file,
some warning message occurred from MS Excel.
Warning message like this:
File format and extension name does not match. Files may have been corrupted or not safe. Please do not open unless you trust the source. Do you still want to open it?
When I click "Yes" bottun, the file can be opened normally。
Here is the source code:
IReportRunnable design = engine.openReportDesign("XXX/new_report.rptdesign");
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
EXCELRenderOption options = new EXCELRenderOption();
options.setOutputFormat("xls");
options.setWrappingText(true);
options.setOutputFileName("D:/output.xls");
task.setRenderOption(options);
task.run();
Any hints will be appreciated.
THX
Wei
|
|
|
|
Powered by
FUDForum. Page generated in 0.03591 seconds