Update SharePoint List With CSV file using Jquery

In SharePoint we have multiple ways of creating a SharePoint list from an excel file. The import spreadsheet is a very useful too that can help to create a SharePoint list based on excel. But how about updating an existing SharePoint list from excel.

Recently i have a task where i was told to find a way to update a SharePoint list from a excel file. Options i had was to use client site programming only. Doesn’t looked like there is enoguh or easy way of doing this.

So after few days, weeks i wrote a program myself that will help us to achieve this.

The application lets you enter a Site URL which you have access. Then you can pick a list. Then you can choose the columns that you want update. Once your columns are picked or chosen then you can upload a CSV file with the data you have.

Following are the considerations that you need to remember.

The CSV file has to be separated by pipe character (|) rather than comma (,)

The order of columns and the order of data in CSV file has to be matched. The first column selected is text then the first column in csv has to be text as well. If the first column is date then the first column in CSV has to be date (short date) as well. The order follows accordingly.

Here is the code file below.

I have tried this code in both online and on premise SharePoint 2013.

It worked for me without any problem.

Upload this html file to a secure location.

Add a content editor web part and link to this HTML

Here is the screenshots of how it should look.

The Application
Enter the Site URL
Delete existing items if you want
Select the column names
Upload the CSV file
Click on the upload button

You can change the code or modify it as your requirement goes.

Hopefully it helps someone out there.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s