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
ShravanKumarBagamShravanKumarBagam 

Export files from vf page to excel

Hi,

      In a vf page i'm displayed two pageblocks,

  

    

In 1st pageblock - Account records are displayed

In 2nd pageblcok-Contact records are displayed.

 

when i click on a export link on vf page, i want export the Only account records in an excel sheet ...

 

 

 

 

 

Jia HuJia Hu
There is a simple way, you can just make another VF page with only the 1st pagebolock.

In the current page, set the link of export to the new VF page.

Therefore, when you click the link, it will download the Account records from the new page, but not the current page.