Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » BIRT Excel export, Office 2007, warning(The file you are trying to open, 'name.ext', is in a different format than specified by the file extension.)
BIRT Excel export, Office 2007, warning [message #548367] Wed, 21 July 2010 15:08 Go to next message
Reinhard  is currently offline Reinhard Friend
Messages: 31
Registered: July 2009
Member
Hello,

opening my BIRT excel report with Office 2007 causes warning:

The file you are trying to open, 'name.ext', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?

How can I avoid this warning?

I'm using:
BIRT 2.5.2
Office 2007
Eclipse Build: 20100218-1602

Regards
Reinhard
Re: BIRT Excel export, Office 2007, warning [message #548674 is a reply to message #548367] Thu, 22 July 2010 15:41 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Reinhard,

Are you running the XLS directly from the designer or are you first
viewing it in the viewer and then exporting to xls?

Jason

On 7/21/2010 11:08 AM, Reinhard wrote:
> Hello,
>
> opening my BIRT excel report with Office 2007 causes warning:
> The file you are trying to open, 'name.ext', is in a different format
> than specified by the file extension. Verify that the file is not
> corrupted and is from a trusted source before opening the file. Do you
> want to open the file now?
>
> How can I avoid this warning?
>
> I'm using:
> BIRT 2.5.2
> Office 2007
> Eclipse Build: 20100218-1602
>
> Regards
> Reinhard
Re: BIRT Excel export, Office 2007, warning [message #549170 is a reply to message #548367] Sun, 25 July 2010 18:19 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

I always get that warning and you can ignore it. The default Excel emitter doesn't write binary-format Excel files, it writes an interchange format that Microsoft publishes. Excel recognizes the file type when it parses the input but complains that it should have a different extension so it won't have to change gears. I don't know what the extension Microsoft expects is.
Re: BIRT Excel export, Office 2007, warning [message #549215 is a reply to message #548674] Mon, 26 July 2010 07:19 Go to previous messageGo to next message
Reinhard  is currently offline Reinhard Friend
Messages: 31
Registered: July 2009
Member
I generate excel reports programmatically and export them in a file, so I don't open it from viewer or designer.

Here some code snippets:

HTMLRenderOption option = new HTMLRenderOption();
OutputStream outputStream = new FileOutputStream(new File("C:\", "report.xls"));
option.setOutputStream(outputStream);
option.setOutputFormat("xls");
runAndRenderTask.setRenderOption(option);
runAndRenderTask.run();


@Richard
Yes, I know that I can ignore that, but not my customer and it is very irritating to click on "Yes" opening every report
Re: BIRT Excel export, Office 2007, warning [message #549217 is a reply to message #549170] Mon, 26 July 2010 07:21 Go to previous messageGo to next message
Tobias is currently offline TobiasFriend
Messages: 9
Registered: November 2009
Junior Member
On 25.07.2010 20:19, Richard A. Polunsky wrote:
> I always get that warning and you can ignore it. The default Excel
> emitter doesn't write binary-format Excel files, it writes an
> interchange format that Microsoft publishes. Excel recognizes the file
> type when it parses the input but complains that it should have a
> different extension so it won't have to change gears. I don't know what
> the extension Microsoft expects is.

Excel expects the extension xlsx, docx or pptx. When you save your
preview as file and change the extension, the warning in excel should
not occur anymore...
Re: BIRT Excel export, Office 2007, warning [message #549218 is a reply to message #549217] Mon, 26 July 2010 07:22 Go to previous messageGo to next message
Tobias is currently offline TobiasFriend
Messages: 9
Registered: November 2009
Junior Member
On 26.07.2010 09:21, Tobias Feldker wrote:
> On 25.07.2010 20:19, Richard A. Polunsky wrote:
>> I always get that warning and you can ignore it. The default Excel
>> emitter doesn't write binary-format Excel files, it writes an
>> interchange format that Microsoft publishes. Excel recognizes the file
>> type when it parses the input but complains that it should have a
>> different extension so it won't have to change gears. I don't know what
>> the extension Microsoft expects is.
>
> Excel expects the extension xlsx, docx or pptx. When you save your
> preview as file and change the extension, the warning in excel should
> not occur anymore...

Obviously I meant "Office expects..." and not Excel ;-)
Re: BIRT Excel export, Office 2007, warning [message #549846 is a reply to message #549218] Wed, 28 July 2010 08:27 Go to previous messageGo to next message
Reinhard  is currently offline Reinhard Friend
Messages: 31
Registered: July 2009
Member
Changing the filie extension to .xlsx doesn't solve my problem. More than that. I even can't open the file. Excel brings this error message: "The file "report.xlsx" cannot be open by Excel, because the file format and the file extension is invalid. Check if file is damaged and if file extension answers to file format.

If I use .xml as extension for my report and open it with Excel everything works fine without errors or warnings, but that will confuse my customer.
Re: BIRT Excel export, Office 2007, warning [message #551937 is a reply to message #549846] Tue, 10 August 2010 08:59 Go to previous messageGo to next message
Reinhard  is currently offline Reinhard Friend
Messages: 31
Registered: July 2009
Member
Any other ideas or solutions on that?
Re: BIRT Excel export, Office 2007, warning [message #552032 is a reply to message #551937] Tue, 10 August 2010 15:06 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Have you logged a bug for this?

Jason

On 8/10/2010 4:59 AM, Reinhard wrote:
> Any other ideas or solutions on that?
Re: BIRT Excel export, Office 2007, warning [message #556845 is a reply to message #548367] Thu, 02 September 2010 19:21 Go to previous messageGo to next message
dash  is currently offline dash Friend
Messages: 20
Registered: August 2010
Junior Member
Hi Jason,

I run into the exact issue on Birt 2.5.2. Is there a fix for this issue?

Thanks,
kenny
Re: BIRT Excel export, Office 2007, warning [message #556858 is a reply to message #556845] Thu, 02 September 2010 19:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Take a look at this bugs:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=267988

Jason

On 9/2/2010 3:21 PM, dash wrote:
> Hi Jason,
>
> I run into the exact issue on Birt 2.5.2. Is there a fix for this issue?
>
> Thanks,
> kenny
Re: BIRT Excel export, Office 2007, warning [message #778364 is a reply to message #548367] Thu, 12 January 2012 15:54 Go to previous messageGo to next message
Shaju J is currently offline Shaju JFriend
Messages: 5
Registered: January 2012
Junior Member
Hello,
I know this is an old thread. But does anyone have solution for this issue?
Re: BIRT Excel export, Office 2007, warning [message #811697 is a reply to message #778364] Fri, 02 March 2012 17:56 Go to previous messageGo to next message
Alessio Pollero is currently offline Alessio PolleroFriend
Messages: 74
Registered: August 2011
Member
I have the same annoying problem . Have anyone solved the issue ?
Re: BIRT Excel export, Office 2007, warning [message #813294 is a reply to message #811697] Mon, 05 March 2012 04:19 Go to previous message
sam va is currently offline sam vaFriend
Messages: 121
Registered: July 2011
Senior Member
We had the same issue. BIRT generated excels are not native excels. Try using Tribix or Native excel emitters. We are using that right now

http://sourceforge.net/projects/tribix/

http://code.google.com/a/eclipselabs.org/p/native-excel-emitter-birt-plugin/

Thanks

[Updated on: Mon, 05 March 2012 04:21]

Report message to a moderator

Previous Topic:Localization of DataSet Field
Next Topic:GetXMLParams
Goto Forum:
  


Current Time: Thu Mar 28 08:36:46 GMT 2024

Powered by FUDForum. Page generated in 0.04936 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top