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
Preya VaishnaviPreya Vaishnavi 

Export 10000 records to excel from VF

Hi all,

 

I need to export 10000 records on clicking a custom button on VF page.On clicking the custom button on VF page it redirects to another vf page for which the content type is excel format.I am now facing the problem of hitting the  view state size limit (135KB) .I have even included readonly="true" in my both VF pages but that doesnt solve my problem.Even declaring the variable as transient doesnot solve my problem.Let me know if you have faced the issue and the ways you have tried to avoid it.

 

Note:I have used pageblock table on my VF page for excel export.Even using html tags doesnt solve my problem

 

Any suggestions on this is highly appreciated.

 

Thanks in advance!!!!

 

 

bob_buzzardbob_buzzard

Making the collection transient should solve the problem - readonly is more about the number of records that you can access.

 

Can you post some code?

Preya VaishnaviPreya Vaishnavi

Hi Bob,

 

As the variable is needed for another page,i was not able to put the variable as transient because that resulted in the value of null  in another vf page.But minimizing the getter and setter variables and making readonly=true solved the problem.

 

Thanks for your help