+ Start a Discussion
ArunaAruna 

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.
 
SalesFORCE_enFORCErSalesFORCE_enFORCEr
Try to use @ReadOnly, if you don;t want to do any DML
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_ReadOnly.htm
ArunaAruna
I Did tried that I am getting 
Collection size 13,865 exceeds maximum size of 10,000. 

is there any other way.