Comparing Protected Excel Worksheets

DiffEngineX needs to insert blank rows into temporary copies made of the two Excel workbooks it compares in order to get similar regions to line up. Only when the cells have been aligned, is it possible to compare the formulae that reference them due to row insertion and deletion.

As such protected Excel worksheets cannot, by default, by compared by DiffEngineX.

Version 3.03 allows you to specify a password to unlock protected worksheets and thereby allow DiffEngineX to compare them.

This functionality can be found under Settings->Unprotect Worksheets.

If you are supplying command line arguments you should make use of the below.

/unprotectworksheets:true /unprotectworksheetspassword:"password"

Finding Differences Between Two Folders Of Excel Spreadsheet Files

Version 3.02 of DiffEngineX can now report on the differences between two folders of Excel workbook files (xlsx, xlsm, xlsb and xls) in one operation. The new functionality is available from the Compare Folders menu item under Tools.

The relevant section of the help file can be found here.

Compare folders of Excel workbook spreadsheet files xlsx xls xlsm xlsb

Exit Codes When Calling DiffEngineX Programmatically

DiffEngineX Exit Codes Command Prompt bat cmd file

DiffEngineX returns meaningful exit codes when called programmatically or from batch files. Only versions 2.22 and above return codes -5, -6 and -7. Only versions 3.02 and above return codes -8, -9, -101 and -102.

Exit CodeDescription
Positive Integer Number of worksheet cell differences
0 No worksheet cell differences found
-1 General Error
-2 Number of differences greater than maximum integer value
-3 Workbooks could not be compared due to protected worksheets
-4 Workbooks are different, at least, because of unpaired worksheet names
-5 Row or column alignment has failed
-6 Visual Basic difference report could not be displayed in a web browser
-7 Visual Basic difference report could not be output
-8 Error while comparing Excel defined names
-9 Error while comparing comments
-101 No worksheet cell differences found, but differences found in one or all of VBA, names or comments*
-102 Worksheet cells differences found and differences found in one or all of VBA, names and comments*

* The switches /comparevisualbasic, /compareexcelnames and /comparecomments must be specified if you wish to check for differences in VBA macros, defined names and comments.

In summary any positive integer, -4, -101 and -102 signify differences have been found in the Excel workbooks. 0 means no differences have been found. All the other codes signify errors or that checking for differences could not be completed.

A sample batch file (*.bat) testing the exit code is given below.

@echo off
del r.xlsx

"C:\Program Files\Florencesoft\DiffEngineX\DiffEngineX" /inbook1:"a.xlsx" /inbook2:"b.xlsx" /report:r.xlsx

@if "%ERRORLEVEL%" == "0" goto good

:fail
echo Workbooks are different or error occurred
echo return value = %ERRORLEVEL%
goto end

:good
echo Workbooks have no cell differences
echo return value = %ERRORLEVEL%
goto end

:end


Compare Excel Spreadsheet Files By Drag And Drop

Version 3.01 of DiffEngineX now supports the comparison of Microsoft Excel workbook files via drag and drop.

Simply drag and drop one or two Excel spreadsheet files on to any part of DiffEngineX's main user interface to load them, prior to clicking Start Comparison. If the desired workbook files are in open folders, this will be quicker than hitting the Browse button.

Any kind of file that Microsoft Excel can import is allowed, although the best results will be obtained with Excel workbook files (xls, xlsx, xlsm, xlsb).

Text Diff Tool For Microsoft Word & Excel 2013

A free 30-day trial of our tool to compare text in Microsoft Word and Excel 2013 is available from the Microsoft Store.



N.B. When comparing multiple Excel rows, as shown in the video, it is better to compare at the level of words than characters. It is primarily a text diff tool. DiffEngineX is our full featured Microsoft Excel compare software.



{besps}selectiondifftool{/besps}

{besps_c}0|excel1.png|Excel 2013 App: Comparing Two Lists|{/besps_c}
{besps_c}0|excel2.png|Red and green for deletions and additions|{/besps_c}
{besps_c}0|excel3.png|Only showing the differences|{/besps_c}
{besps_c}0|word1.png|Word 2013 App: Comparing Text|{/besps_c}
{besps_c}0|word2.png|Blue and gray for moved up and down|{/besps_c}
{besps_c}0|word3.png|Just the changes|{/besps_c}
{besps_c}0|word4.png|Just the changes, but reordered lines omitted|{/besps_c}
{besps_c}0|word5.png|Choice of two panes or single pane for the differences|{/besps_c}