locked
how to update a custom list when there is a changes in excel sheet uploaded in document library RRS feed

  • Question

  •  

    I have created a document library in which m uploading a excel sheet with values in it and i have created a custom list with same no.of.rows and columns in the excel sheet given the same name of columns. Now i have to make sure that whatever changes i do in the excel sheet should automatically gets updated in custom list in sharepoint

    Wednesday, April 30, 2014 11:09 AM

Answers

  • Assuming that the Excel sheet is of the more recent XML format I would suggest parsing the file into a DOM and then use that to update your custom list.
    Wednesday, April 30, 2014 2:12 PM
  • You'll need to create an event receiver for when you add/update a document on the source library (http://msdn.microsoft.com/en-us/library/office/gg749858(v=office.14).aspx)

    Then, with code open the excel file and count the rows. You can use the OpenXmlSDK to do that (http://www.microsoft.com/en-us/download/details.aspx?id=5124)

    Good luck ;)

    • Proposed as answer by [Yavuz B.] Thursday, May 1, 2014 5:52 AM
    • Marked as answer by Patrick_Liang Monday, May 5, 2014 4:36 AM
    Wednesday, April 30, 2014 2:40 PM

All replies

  • My understanding is that you have created a Doc library which contains Excel workbooks say Excel1,Excel2,Excel3.Now for each Excel you have Created a Custom List with same columns and data  as in Excel.Do you want to know if the changes made in Excel1 would reflect in Custom List1?


    Wednesday, April 30, 2014 12:15 PM
  • Assuming that the Excel sheet is of the more recent XML format I would suggest parsing the file into a DOM and then use that to update your custom list.
    Wednesday, April 30, 2014 2:12 PM
  • You'll need to create an event receiver for when you add/update a document on the source library (http://msdn.microsoft.com/en-us/library/office/gg749858(v=office.14).aspx)

    Then, with code open the excel file and count the rows. You can use the OpenXmlSDK to do that (http://www.microsoft.com/en-us/download/details.aspx?id=5124)

    Good luck ;)

    • Proposed as answer by [Yavuz B.] Thursday, May 1, 2014 5:52 AM
    • Marked as answer by Patrick_Liang Monday, May 5, 2014 4:36 AM
    Wednesday, April 30, 2014 2:40 PM