function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
nwbienwbie 

Export to Excel issue in Sandbox

 Exporting as Excel from VF page is not working in Sandbox: Instead of actual output it gives weird set of code in the excel that opens, This works fine in Developer edition.

Any workaround for this?

I used the below contenttype:


<apex:page Controller=".." sidebar="false" showHeader="false" contenttype="application/vnd.ms-excel#{!filename}" cache="true" standardstylesheets="false">
<--
PageBlock Table
-->

</apex:page>

Thanks in advance:)

stephenx1212stephenx1212

HI,

 

There is an artcle which mainly tells how to export data to excel.

 

Data Export from Database to Excel, PDF and Word for .NET without Automation and Acrobat Reader 

 

You can have a try~