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

After executing apex batch I want to display the query results on vf page or generated excel sheet.

Hi there,

I know Batch class is asynchronous

I am having a requirement where the soql will get larger set of data with all the joining queries.
I need to display larger data   on excel sheet when I click on vf page button.

By using normal apex class soql  will only return 50,000 records . so I thought of using apex batch and process the soql and then display the results in excel sheet.

is it possible to display apex batch results on excel ? or is there any other where we can process more than 1 million data and display on excel sheet.
Try to use @ReadOnly, if you don;t want to do any DML
I Did tried that I am getting 
Collection size 13,865 exceeds maximum size of 10,000. 

is there any other way.