How do I create a readable diff of two spreadsheets using git diff?

前端 未结 21 1511
醉话见心
醉话见心 2020-12-04 04:27

We have a lot of spreadsheets (xls) in our source code repository. These are usually edited with gnumeric or openoffice.org, and are mostly used to populate databases for u

相关标签:
21条回答
  • 2020-12-04 05:25

    I have found xdocdiff WinMerge Plugin. It is a plugin for WinMerge (both OpenSource and Freeware, you doesn't need to write a VBA nor save an excel to csv or xml). It works just for the celd's contains.

    This plugin supports also:

    • .rtf Rich Text
    • .docx/.docm Microsoft WORD 2007(OOXML)
    • .xlsx/.xlsm Microsoft Excel 2007(OOXML)
    • .pptx/.pptm Microsoft PowerPoint 2007(OOXML)
    • .doc Microsoft WORD ver5.0/95/97/2000/XP/2003
    • .xls Microsoft Excel ver5.0/95/97/2000/XP/2003
    • .ppt Microsoft PowerPoint 97/2000/XP/2003
    • .sxw/.sxc/.sxi/.sxd OpenOffice.org
    • .odt/.ods/.odp/.odg Open Document
    • .wj2/wj3/wk3/wk4/123 Lotus 123
    • .wri Windows3.1 Write
    • .pdf Adobe PDF
    • .mht Web Archive
    • .eml Exported files from OutlookExpress

    Regard, Andres

    0 讨论(0)
  • 2020-12-04 05:31

    There is a library daff (short for data diff) which helps in comparing tables, producing a summary of their diffs, and using such a summary as a patch file.

    It is written in Haxe, so it can be compiled in major languages.

    I have made an Excel Diff Tool in Javascript with help of this library. It works well with numbers & small strings but the output is not ideal for long strings (e.g. a long sentence with with minor character change).

    0 讨论(0)
  • 2020-12-04 05:32

    Quick and easy with no external tools, works well as long as the two sheets you are comparing are similar:

    • Create a third spreadsheet
    • Type =if(Sheet1!A1 <> Sheet2!A1, "X", "") in the top left cell (or equivalent: click on the actual cells to automatically have the references inserted into the formula)
    • Ctrl+C (copy), Ctrl+A (select all), Ctrl+V (paste) to fill the sheet.

    If the sheets are similar, this spreadsheet will be empty except for a few cells with X in them, highlighting the differences. Unzoom to 40% to quickly see what is different.

    0 讨论(0)
提交回复
热议问题