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
kallam salesforce1kallam salesforce1 

let say we have CSV file in Batch class, what will you use here Database.Batchable or Iterable? and Why?

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Kallam,

We have to uset Iterable in case of the CSV file reading in the apex class. As we have several columns and rows and because of this Iterable class it creates a striing for each row. 

Please find the below example for the same.

If this solution helps, Please mark it as best answer.