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
viswsanathviswsanath 

What is the value of "renderas" attribute to display o/p in the form of Excel Sheet

What is the value of "renderas" attribute to display o/p in the form of Excel Sheet
Bhawani SharmaBhawani Sharma
You don't need to use renderAs if you want o/p in excel format. use following:
<apex:page contentType="application/vnd.ms-excel#Export.xls" cache="true">
Naveen MosuruNaveen Mosuru
Hello viswsanath,

If u want to generate Excel file then u have to use contentType attribute rather than a renderAs attribute.
<apex:page contentType="application/vnd.ms-excel">
  This is your new Page
</apex:page>

Thank You,
Naveen.