-
Notifications
You must be signed in to change notification settings - Fork 2
Compare Spreadsheets
Asbjørn Skødt edited this page Aug 8, 2022
·
3 revisions
Use Microsoft Spreadsheet Compare to manually compare two spreadsheets. Spreadsheet Compare is bundled in Microsoft Office Professional Plus 2013, 2016, 2019 and Microsoft 365 Apps for enterprise.
You can also input two files and open comparison from command line using this cose.
void Compare_Spreadsheets(string filepath_one, string filepath_two, string output_filepath)
{
// Create script file
string script_filepath = output_filepath + "\\script.txt";
using (StreamWriter bcscript = File.CreateText(script_filepath))
{
filepath_one
filepath_two
}
// Run Spreadsheet Compare
int version = [YOUR OFFICE VERSION e.g. 13, 16, 19];
Process app = new Process();
app.StartInfo.FileName = $"C:\Program Files (x86)\Microsoft Office\Office{version}\DCF\SPREADSHEETCOMPARE.EXE";
app.StartInfo.Arguments = $"\"@{script_filepath}";
app.Start();
app.WaitForExit();
app.Close();
// Delete script file
File.Delete(script_filepath);
}