I have single Excel sheet but this single excel sheet having multiple sheets(means multiple objects each sheet).How to import multiple sheets(means multiple objects with single excel with different sheets).

Using below code i was done import for single excel sheet for single object with but how to do import multiple objects(means i have one excel but this excel having multiple sheets(means multiple objects)).

For code plz see this link https://developer.salesforce.com/forums?state=id#!/feedtype=SINGLE_QUESTION_DETAIL&dc=Apex_Code_Development&criteria=OPENQUESTIONS&id=906F0000000BTbWIAW


1 Answer 1


Hi You can use this js plugin https://github.com/SheetJS/js-xlsx which will convert your file to csv format for multiple sheets, then you can use this code which will import data from csv format. http://www.sfdcpoint.com/salesforce/import-csv-file-using-apex-visualforce/

https://github.com/SheetJS/js-xlsx/blob/master/index.html this is the link to index.html page in which process_wb method is doing the job of giving u csv files format string as per number of sheets present in excel file. just go through flow. it is easy. and then u can use http://www.sfdcpoint.com/salesforce/import-csv-file-using-apex-visualforce/ this to create record in sf org

  • some debugging is needed to make thing works
    – Ankuli
    Aug 18, 2015 at 7:40
  • could you please tell me how to use this js plugin ,i am new with this? Aug 18, 2015 at 8:17
  • oss.sheetjs.com/js-xlsx this link is illustrating the way it work.
    – Ankuli
    Aug 18, 2015 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.