Please note: only a user with a Site Manager can migrate a CSV file into SiteFarm. If you haven't already, please use our Service Request Form to ask that the Migration Module be enabled for you.
What is CSV?
CSV stands for "comma separated values". A CSV is a very simple text format used to store tabular data, such as you would see in a spreadsheet or database. Files in the CSV format can be imported to and exported from programs that store data in tables, such as Microsoft Excel. At a bare minimum, you can use a plain text editor to create a CSV file too.
Why would I add people using a CSV file?
If you have the ability to do this, it's a huge time-saving benefit; you'll be able to add your people (assuming you've properly formatted the file) all in one upload instead of creating each person individually in SiteFarm.
Where do I get a CSV file?
If you have a spreadsheet or database where you're maintaining a list of your faculty, staff, and/or students, and have the ability to export it to a CSV format, this is the easiest approach.
Alternately, you can create one manually in a plain text editor or in a spreadsheet application like Excel or Google Sheets.
Instructions for Preparing a CSV File
- (Optional) Download the built-in people CSV file already included in your site by going to your homepage, then add this pathway to your browser's URL field: /profiles/sitefarm/tests/files/people.csv. This is a starter file with the header row included.
- Create the CSV using either a text editor or using Excel and saving to CSV, making sure the field delimiter is a comma.
- Must have a header row in the file
- For any text fields, use a double quote to use commas within content. Example: "Hello, my name is Tom"
- For fields that allow multiple values such as website or phone, use a semi-colon to separate the values.
Example: http:s//sitefarm.ucdavis.edu; https://fire.ucdavis.edu
- If any value is not being used, simply create a placeholder for it. Every value must have a spot.
Preparing a People CSV file
|phone||can have multiple phone numbers - phone number format (flexible)|
|website||can have multiple sites, must have protocol in addition to the site name (i.e. http://)|
|country*||must be 2 letter country code (US most likely)|
|zipcode||numbers but can have a dash for zip+4|
|state||2 letter state code|
Imagine this is an Excel spreadsheet. The first row would contain the Field Names as listed above. All subsequent rows would contain the information specific to an individual.
1,Jeroen,Post,cred1,Programmer 4,IET,firstname.lastname@example.org,(530)111-2222,http://firstwebsite.com;http://secondwebsite.com,10a-4p,My Location,US,Comp1,999 Jsaf,suite2,Davis,95616,CA,Cool bio
2,Tom,Stolz,cred2,Supervisor I,IET,email@example.com;firstname.lastname@example.org;email@example.com,(530)752-3859;(916)335-5529,http://firstwebsite.com,9a-5p,My Awesome Location,US,comp2,443 K Ste, ,Sac,95818,CA,Best bio
3,John,Jones,cred3,Programmer 3, IET,firstname.lastname@example.org;email@example.com,(530)111-2222,http://secondwebsite.com,12n-6p,My Location,US,comp3,444 J street, ,Sacree,95616,CA,best of the best bio
Importing the File in SiteFarm
- Navigate to Manage » Configuration.
- Locate the SiteFarm section of the page, then look for and click on SiteFarm Migrations.
- Review the tabs under the page title Migration overview and select the People CSV Migration tab.
- On the People CSV Import screen, you will be prompted to upload your file. Click Upload File to continue.
- A confirmation screen will appear showing you the first three entries to your file to let you review your formatting and confirm your structure is problem-free. Scroll to the bottom and click Generate Migration to continue.
- On the Do you want to start the import? page, you can proceed to convert your CSV file information into Person content types by clicking on Perform Import. Upon completion, you will be returned to the Migration Overview Dashboard. You can now review your People directory and/or the import stats pertaining to your CSV import.