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
NPNP 

VF page or Excel

I have a report in VF page, now I want the same page to be export to Excel.  I do not want to write the same code again for one change  to the page tag: "ContentType": .

 

 

Bhawani SharmaBhawani Sharma

In the controller's constructor you can decide that what content type you want to use and can bind thos with a property.

Use this property on the Content Type attribute.

NPNP

Can you please add the code ?

 

 I want is the VF page or the Excel file, to ge the excel file we need to have contenttype in the page tag, and if we want the VF page then removed the contenttype. 

 

Thanks