
Workbook destinationWb = () įoreach (var sourceFilePath in sourceFilePaths) Create a new workbook (index=1) and open source workbooks (index=2,3.) This method takes any number of excel file paths and copy them into a new file: private static void MergeWorkbooks(string destinationFilePath, params string sourceFilePaths)Īpp.DisplayAlerts = false // No prompt when overriding You’ll notice that all updates made by other users of the workbook have been added and compiled into the final version of the document.An easier solution is to copy the worksheets themselves, and not their cells. In the Select Files to Merge into Current Workbook dialog box, select a copy/copies of the workbook that contains the changes that you want to merge, and then click OK.

On the Quick Access toolbar, select as below Ĥ. Open the copy of the shared workbook into which you want to merge the changes.Ģ.Click the File tab, and then select Options.Let’s first add the Compare and Merge Workbooks command: All copies of a shared workbook should be located in the same folder as the shared workbook.ġ. In this tip, we show you how to get this done.Īll users of the shared workbook must save a copy of it that contains their changes, and use a unique file name that differs from the original workbook. This is perfect for when you want to verify the updates made by other users and need to compile the final version of the document. Sometimes when working in Excel and collaborating with your colleagues on a single document, you may wonder to yourself how can I compare and merge a shared workbook? The answer is simple! You can do this by using the Compare and Merge Workbooks command (this command will have to be added to the quick access toolbar, since it’s not available on the Review tab).
