You need to sign in to do that
Don't have an account?

Download more than a thousand records in Excel
Hello everyone,
We've developed a custom button, to download an Excel with records from a custom object.
It works fine and It's really useful, but sometimes there are more than a thousand records... We use a 1.000 records query limit, but It'd be great to download all records.
We tried with batch processing but It doesn't work.
Any idea?
Thanks in advance
Hmmm it's Possible but if u VF page can hit the view state or a heap size limt error
Try to use something like this:
<apex:page controller="DownloadExcelController" contentType="application/vnd.ms-excel#ExportResult.xls" showHeader="false" sidebar="false" cache="true" readOnly="true">
. . .
</apex:page>
Set readOnly tag to "true". In read-only mode, a page may not execute any DML operations, but the limit on the number of records retrieved is relaxed from 50,000 to 1 million rows.