Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Importing data from CSV / CSVBulkUploader


Go to End


1609 Views

Avatar
edski

Community Member, 12 Posts

12 May 2011 at 7:30am

I am looking for some sample code to enable me to import data from a CSV file. I have seen some documentation for the CsvBulkUploader class (http://api.silverstripe.org/trunk/cms/bulkloading/CsvBulkLoader.html) - I think is probably the right starting point, but I would really appreciate some sample code to speed up the learning curve!

Currently, I am not sure whether I intend to create new DataObjects or simply parse the imported data into an HTML table and store in a single field on a "page". I don't think I will use it to create new pages in their own right.

Any help greatly appreciated.