+ Start a Discussion
s_foos_foo 

support for excel 2007

Hi,

 

I have a page which opens a excel . Till the time it is working fine but when the end users installed new version of MS-Office i.e. excel 2007, the current page started giving following warning

"The file you are trying to open, 'TestFile.xls', 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?"

 

Following is the code line which is generating my output in excel file.

<apex:page cache="true" contentType="application/vnd.ms-excel#TestFile.xls" controller="TestFileController" language="en_US">

 

Is there a way to get rid of this message? Any help on this is appreciated.

 

Thanx

 

S

Ron HessRon Hess

Check out this page

http://blogs.msdn.com/vsofficedeveloper/pages/Office-2007-Open-XML-MIME-Types.aspx

 

try content type =

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

 

and file sufix xlsm

 

you can also see other poeple who have built solutions for streaming to excel.

since this is PHP you can't use the code, but you can see what's going on.

http://www.phpbuilder.com/board/showthread.php?t=10357101

 

 

s_foos_foo

Ron,

 

Thanx for your help but the following solution will only open files in the newer version of excel. I have to support the 2003 version as well. Any suggestions  are appreciated.

 

Thanx

 

S

Ron HessRon Hess
It looks like the extension is correct and the content type is correct, perhaps you can turn off this warning inside Excel ?
s_foos_foo

Ron,

 

Thanx a lot for your suggestion but coz the application is client facing, its not possible to turn-off inside excel.

 

Thanx

 

S