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
Aa HashAa Hash 

import csv file into salesforce custom object to create record t using VF?

Hi all
It's really urgent I am totally new to coding I want to import my excel file to my custom object Sample__c to create new records using visual force page but even after searching, I am unable to complete it and am totally stuck.
I have an excel file with columns Name, Email, Phone and need to import the values to Sample__c fields Name__c, Email__c, Phone__c but can't do this any help from experts as I already followed all the links related to this now I need full code.
Thanks
Best Answer chosen by Aa Hash
mukesh guptamukesh gupta
Hi ,

First you need to understand the actual process of data import provided by salesforce

https://trailhead.salesforce.com/content/learn/projects/extend-npsp-data-importer-with-advanced-mapping/import-data-to-a-custom-object

After that follow below url to display imported data in VF page 

https://jayakrishnasfdc.wordpress.com/2018/09/29/import-csv-file-data-using-apex-vf-page/


​​​​​​​if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh

 

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Can you check the solution provided in the below link. I hope this is what you are looking for.

https://jayakrishnasfdc.wordpress.com/2018/09/29/import-csv-file-data-using-apex-vf-page/

Let me know if you face any issues.

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

Thanks,
mukesh guptamukesh gupta
Hi ,

First you need to understand the actual process of data import provided by salesforce

https://trailhead.salesforce.com/content/learn/projects/extend-npsp-data-importer-with-advanced-mapping/import-data-to-a-custom-object

After that follow below url to display imported data in VF page 

https://jayakrishnasfdc.wordpress.com/2018/09/29/import-csv-file-data-using-apex-vf-page/


​​​​​​​if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh

 
This was selected as the best answer
Aa HashAa Hash
Thanks Guys now I have seen my records are uploaded now i have to move forward , i want these records to be saved as a record on my custom object Sample__c .