This script imports data from a CSV file into a SharePoint list. This script can also be used to automate importing data into SharePoint. Assuming you have an external system which is exporting to CSV, this script can be scheduled via Windows Tasks to run and import the data on a periodic basis.
- Set your web's URL, i.e. http://servername, or http://servername/site/site
- Set your lists's name, i.e. Calendar, Tasks, My List
- Set your CSV file name
- Add all fields you wish to add. The $new[ is your SharePoint field name, the $i. is your CSV file column name.