Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spreadsheet Compare (Office 2013) automation from .NET application or VSTO add-in

Tags:

excel

vsto

Is it possible to automate the new Spreadsheet Compare tool of Office 2013 from a .NET application or a VSTO Excel add-in by embedding some Microsoft assemblies?

A similar question was asked for VBA programming and the response was no.

I managed to execute the application "C:\Program Files (x86)\Microsoft Office\Office15\DCF\SPREADSHEETCOMPARE.EXE" in command-line with a text file as input argument containing two workbooks paths in separate lines, but it would be easier to call a method directly from the code, as for the other functions of Excel.

like image 602
JulienVan Avatar asked Oct 20 '22 06:10

JulienVan


1 Answers

I wrote a simple batch script that allows compare of two files from a command line. Please refer to github: https://github.com/kniklas/excomp for further details.

I hope it will help those who would like to automate process of excel comparison (e.g. to hook this for version control - diff - of excel files).

like image 131
Kamil Niklasinski Avatar answered Oct 23 '22 00:10

Kamil Niklasinski