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
Jimmy MaoJimmy Mao 

How to import data with csv file after package is installed

We have some master data which needs to be imported into salesforce right after the package is installed. I know there's a way to implement post script interface to insert these data by apex code. But I want to know if there's way to import data quickly with a csv file like what we did to import data on the salesforce page.

thanks for any comments
Best Answer chosen by Jimmy Mao
BalajiRanganathanBalajiRanganathan
As you said before, implement the post script interface, you can add your csv as static resource to your package and your post script can
read this file and then insert the data.

http://blog.codescience.com/2014/05/loading-data-sets-during-managed-package-installation/

All Answers

BalajiRanganathanBalajiRanganathan
You can use Salesforce Import Data Wizard or Data loader tool to import CSV data.

https://help.salesforce.com/apex/HTViewHelpDoc?id=importing_unified.htm&language=en_US

Data Loader
https://developer.salesforce.com/page/Data_Loader
 
Jimmy MaoJimmy Mao
Thanks balaji, what i need is to do the data import programatically with the package, not do it manually by user. 
BalajiRanganathanBalajiRanganathan
As you said before, implement the post script interface, you can add your csv as static resource to your package and your post script can
read this file and then insert the data.

http://blog.codescience.com/2014/05/loading-data-sets-during-managed-package-installation/
This was selected as the best answer
Jimmy MaoJimmy Mao
Thanks BalajiRanganathan, it works as what you said.