You need to sign in to do that
Don't have an account?
VSK98
How can we import the csv file which is having multiple sheets in a csv file using Apex
Hi All,
I have a requirement like a User has entered the Account & Contacts details in different sheets in a single excel. Once entered the user will save into the Csv File & upload the file from VisualForce Page. Once Uploaded, the Accounts & contacts should be stored in SFDC.
Adv Thanks !!!!!!!!!!
Regards,
VSK98
I have a requirement like a User has entered the Account & Contacts details in different sheets in a single excel. Once entered the user will save into the Csv File & upload the file from VisualForce Page. Once Uploaded, the Accounts & contacts should be stored in SFDC.
Adv Thanks !!!!!!!!!!
Regards,
VSK98
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 the index.html page in which process_wb method is doing the job of giving u CSV files format string as per the number of sheets present in excel file. just go through flow. it is easy. and then u can usehttp://www.sfdcpoint.com/salesforce/import-csv-file-using-apex-visualforce/ (http://www.sfdcpoint.com/salesforce/import-csv-file-using-apex-visualforce/ )this to create a record in SF org.
Hope this helps.
Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra
Thanks for your quick response!!
I tried with your above link, it's reading only single sheet but I have two multiple sheets in the excel. The SheetJS not reading the two sheets within an excel sheet.
Regards,
VSK98