How to Update Multiple SharePoint List Items with Correlating Items from an Excel File

I haven't found an exact solution for this yet. I'm trying to update a list of about 89 items in SharePoint with 89 correlating items in an Excel file. For example, SharePoint column "Title" correlates to the "Title" column in Excel. All Titles are unique but the Excel file is more current. So I have data connections to the SharePoint list and to the Excel file. Now I need to tell InfoPath to update ANY SharePoint list items, whose Title correlates to the Excel file title, WITH the updated data from the Excel file. I can pull in the data from the Excel file but I'm not able to correlate it so that updates ALL SharePoint list items accordingly.

Example:

SharePoint List:

Title    Number

Jack     224

Mary    227

UPDATE WITH NEW INFO:

Excel File:

Title     Number

Jack     211

Mary    113

May 26th, 2015 1:05pm

It sounds like you should be able to easily create a view in SharePoint that mimics the Excel file, and then use datasheet view to copy and paste in the new values.. It seems like this is too obvious of an answer, and there is already a reason you haven't done it.. is there?

Free Windows Admin Tool Kit Click here and download it now
May 26th, 2015 5:26pm

I'm cutting and pasting now but would like to eliminate that process by using InfoPath.

My data source is an Excel file that gets cut and pasted to a SharePoint list. I would like to eliminate that process, access the Excel file directly, using InfoPath. I have some knowledge on how to do that. What I don't have is a way to correlate with the existing SharePoint list (the out dated list) and the updated Excel file.

All new info comes from the Excel file and I do a cut and paste to the SharePoint list and overwrite the old data. What I would like to do is to match the Titles from the Excel file to the SharePoint list and replace the "Number" data, if it is different, with the new number data from Excel.


  • Edited by JJSHAREP Wednesday, May 27, 2015 12:02 PM
May 27th, 2015 12:01pm

Hello,

>What I would like to do is to match the Titles from the Excel file

How you are getting data from excel to infopath form? If you are using OLEDB connection then you may need to write code to read that excel data and compare with list data then update in list.

Refer this MSDN to read Db connection via code:

https://msdn.microsoft.com/en-us/library/office/aa947962.aspx?f=255&MSPPError=-2147217396

Finally use SP object model code to read data from list and update in list.

https://msdn.microsoft.com/en-us/library/dd490727%28v=office.12%29.aspx

Above approach is fine if you want user to select data which need to update in list. But if you want to automate this then create custom timer job, where you can read excel data and update into list.

Hope it could help

Free Windows Admin Tool Kit Click here and download it now
June 4th, 2015 2:46am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics