Synchronizing Data in Multi-User Excel Sessions with Autosave

Mark 5 Reputation points
2024-11-06T13:11:57.6666667+00:00

This involves synchronization using OneDrive and using Excel (for Web and for Desktop).

We maintain an add-in which has a moderate amount of state besides what is visible in the Excel sheets. We currently use mechanics such as CustomXmlParts, and are investigating using Settings.

However we identified a number of issues when it comes to autosave. For example, when performing quick updates to Settings using the Excel.Settings API, some changes can get lost and synchronization can take seconds without a way to know you are desynced.

Additionally you might get a synchronization error ("Can't merge changes") and are forced to reload. The Office.Settings API even explicitly documents that synchronization does not happen between two Excel for Desktop instances, only when a Excel for Web instance is involved.

When it comes to CustomXmlParts, there is no way at all to know whether a different instance has change an Xml Part. There's an API under the Office namespace, but this is limited to Word only. The Excel CustomXmlPart API does not have an event of such kind.

tl;dr What is a way to ensure no synchronization conflicts occur between multi-user sessions, and how to know whether another user updated an XML part?

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,986 questions
0 comments No comments
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.