Update a Shared List
There are several ways to update a shared list:
Refreshing discards local changes and updates the (local) worksheet list with data from the SharePoint server.
Synchronizing updates both the worksheet list and the SharePoint list. Conflicts between local edits and edits from other users can be resolved by the user who is synchronizing.
Note
If youâre not upto- date, thereâs no point in sharing.
How to do it
From Excel, use the Data â List menu to refresh or synchronize a list.
From code, use the ListObjectâs Refresh
method to discard changes to the list on the worksheet and refresh it with data from the SharePoint server:
lst.Refresh
Use the UpdateChanges
method to synchronize the worksheet list with the SharePoint list:
lst.UpdateChanges xlListConflictDialog
If two authors modify the same item in a list, a conflict will occur when the second author updates his list. The iConflictType
argument determines what happens when a conflict occurs. Possible settings are:
Setting | Description |
---|---|
|
Displays the Resolve Conflicts and Errors dialog box to resolve the conflict (this the default). |
|
Replaces conflicting data on the SharePoint server with data from the worksheet. |
|
Replaces conflicting data on the worksheet with updates from the SharePoint server. |
|
Updates the items that do not conflict and generates an errorââCannot update the ... |
Get Excel 2003 Programming: A Developer's Notebook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.