介绍一款小巧的Excel比对工具-DiffExcel

news/2024/7/21 5:40:32 标签: excel, git

【缘起:此前找了一通,没有找到免费又好用的Excel比对工具,而ExcelBDD需要把Excel文件存放到Git,因此迫切需要Excel比对工具。

最新升级到V1.3.3,因为git diff有变化,原来是git diff会修改文件名,现在不改了,导致老版DiffExcel失效】

DiffExcel is an open-source and text-based tool to compare Excel, it supports Git diff.
It looks like the below:

Pre-Requirement

  • Microsoft Excel
  • PowerShell, which is pre-installed in Windows10 and the later

Install

  1. Open PowerShell
  2. execute Install-Script -Name DiffExcel
    2.1 if updating, execute Update-Script -Name DiffExcel

Direct Usage

In PowerShell, use below syntax:
DiffExcel OldExcelFilePath NewExcelFilePath
e.g. DiffExcel E:\Code\ExcelBDD\DiffExcel\Test\OldFile.xlsx E:\Code\ExcelBDD\DiffExcel\Test\NewFile.xlsx

DiffExcel OldExcelFilePath NewExcelFilePath -Open
-Open: if Open switch is set, the new Excel file will open if any change is found.

git-diff">Config Git Diff

Prepare a Diff bat file

PowerShell -ExecutionPolicy Unrestricted -Command DiffExcel %2 %5

save this bat file to somewhere on your computer, e.g. E:/Code/ExcelBDD/DiffExcel/DiffExcel.bat

if the changed file is wanted open for further check after diff, use the below command.

PowerShell -ExecutionPolicy Unrestricted -Command DiffExcel %2 %5 -Open

git%2Fconfig">Set .git/config

add or edit the .git/config file in your repository or your global and amend the following:

[diff "excel"]
	command = E:/Code/ExcelBDD/DiffExcel/DiffExcel.bat

gitattributes">Set .gitattributes

*.xls* diff=excel

git-diff-usage">Git Diff Usage

Totally the same as usual git diff, e.g.

git status
git diff theChangedExcelFile

Other Output Example

Changed Cells


The -Open is set, the it reminds "The new file is open, please check."

New Worksheet

Missing Worksheet


http://www.niftyadmin.cn/n/5087091.html

相关文章

华纳云:tomcat高并发阻塞问题怎么解决

Tomcat高并发阻塞问题可能会导致应用性能下降,但可以采取多种措施来解决这些问题。以下是一些可能的解决方案: 增加Tomcat线程池大小: Tomcat使用线程池来处理请求。你可以通过增加线程池的大小来提高处理并发请求的能力。这可以通过编辑Tomc…

让ChatGPT等模型学会自主思考!开创性技术“自主认知”框架

ChatGPT、百度文心一言、Bard等大语言模型展现出了超强的创造能力,加速了生成式AI的应用进程。但AI模型只能基于训练数据执行各种任务,无法像人类一样利用生活知识、过往经验用于复杂的推理和决策。 例如,在玩游戏时,人类可以利用…

计算机体系结构和操作系统

这篇文章的主要内容是冯诺依曼计算机体系结构和操作系统的理解。 目录 一.冯诺依曼计算机体系结构 二.操作系统的理解 一.冯诺依曼计算机体系结构 如图是冯诺依曼计算机体系结构,计算机本质就是对数据进行处理的机器,图中,数据从输入设备交给…

在CentOS上安装SQL Server,并通过cpolar内网穿透实现数据库的公网访问

文章目录 前言1. 安装sql server2. 局域网测试连接3. 安装cpolar内网穿透4. 将sqlserver映射到公网5. 公网远程连接6.固定连接公网地址7.使用固定公网地址连接 前言 简单几步实现在Linux centos环境下安装部署sql server数据库,并结合cpolar内网穿透工具&#xff0…

word怎么压缩?word太大这样压缩准没错

在日常办公中,我们常常需要处理大量的Word文档,然而这些文档可能会占用大量的存储空间。那么,如何有效地压缩Word文档呢?接下来,我们将为大家介绍几个实用的压缩方法,一起来看看吧! 一、直接压缩…

C++ - git 命令行

为什么要有 git 你很可能遇到过这种情况,在写项目的时候,要我不符合 leader 的要求,因而修改了很多个版本,但是修改到最后一版的时候,leader 有觉得当前这版还没有之前 某一版好,现在又要求你在 之前的那一…

Android Studio gradle手动下载配置

项目同步时,有时候会遇到Android Studio第一步下载gradle就是连接失败的问题。 这种情况,我们可以手动去gradle官网下载好gradle文件,放置在Android Studio的缓存目录下,这样AS在同步代码时就会自动解压下载好的文件。 步骤如下&…

mysql中的几种排名函数

mysql中的排名函数 mysql里面的排名函数&#xff0c;涉及有以下几个&#xff1a; rank()、dense_rank()、row_number() 1、rank() 函数 RANK() OVER (PARTITION BY <expression>[{,<expression>...}]ORDER BY <expression> [ASC|DESC], [{,<expression…