xlcompare
Compare two Excel files (old vs new) where each row has a unique ID (identifier). Ideal for comparing requirements, bill of materials, invoices, exported databases, etc. Generates differences Excel file showing changes from old to new (red strikeout for deletions, blue for insertions). Supports both .xls and .xlsx formats as inputs.
Easy To Use
Generate differences Excel file diff.xlsx with:
xlcompare old.xls new.xls
Features
- Supports both
.xlsand.xlsxfile formats for input files - Generates output Excel file containing differences (default:
diff.xlsx) - Output is autofiltered to show differences at a glance
- Changes in each cell are marked with red strikeout for deletions, blue for insertions
- Deleted rows will be at the bottom in red strikeout
- Pure Python (uses
xlrd,pylightxl,XlsxWriterpackages)
Excel File Format Assumptions
- First row is assumed to contain column headings
- Columns that are common between the two files will be compared (others are ignored)
- Column containing unique IDs is labeled "ID" (can override with the
--idoption)
Limitations:
- Only compares first sheet of each Excel file
- Compares cells as text
- Python 3.6 or later
Installation
python -m pip install xlcompare
Usage
usage: xlcompare [-h] [--id ID] [--outfile OUTFILE] [--colwidthmax COLWIDTHMAX] oldfile newfile
Compares Excel .xls or .xlsx files (first sheet only) with headers and unique row IDs; generates diff.xlsx.
positional arguments:
oldfile old Excel file
newfile new Excel file
optional arguments:
-h, --help show this help message and exit
--id ID ID column heading (default: ID)
--outfile OUTFILE, -o OUTFILE
output .xlsx file of differences (default: diff.xlsx)
--colwidthmax COLWIDTHMAX
maximum column width in output file (default: 50)
Examples
xlcompare old.xls new.xls # Generates diff.xlsx
xlcompare old.xls new.xlsx # Generates diff.xlsx
xlcompare old.xlsx new.xls # Generates diff.xlsx
xlcompare old.xls new.xls -o mydiff.xlsx # Generates mydiff.xlsx
xlcompare old.xlsx new.xls --id MYID # Uses "MYID" as the ID column
Metadata
Release files for xlcompare 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xlcompare-0.2.0.tar.gz | 8.2 kB | Without provenance | Details for xlcompare-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xlcompare-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for xlcompare-0.2.0-py3-none-any.whl |
Total release size: 16.0 kB
Release files / xlcompare-0.2.0.tar.gz
| Download URL | xlcompare-0.2.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
058fdc7d9c8052f2d7ca1f058e4387ea4f0c773bb5ba0dd8ea7c84d96b8d1a1a
|
|
BLAKE2b-256 checksum How to use checksums |
4fef16ea32383dee2e8c64b8be84972813b525bbc999d5488c91b8aff3eed803
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1
|
Release files / xlcompare-0.2.0-py3-none-any.whl
| Download URL | xlcompare-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36bcc56a9c8c1e3ef3f1a9fd1c672d85b33db87a22c1a416e4b75ac664b81171
|
|
BLAKE2b-256 checksum How to use checksums |
d2450b60cbcc8c75f40396e9016ca5de72cdccbd2e310813f6dc5c97128ab62f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1
|
Security for xlcompare 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.