我喜欢比较两个电子表格。让我们说 file1.xls 和 file2.xls。我喜欢将 file1 记录与 file2 列记录进行比较。如果与任何特定单元格匹配,我想更新 file2.xls 上的特定列(例如说 file2.xls 中有一个名为 match 的列。)
例子:
我们需要根据主机名将 file1.xls 与 File2.xls 进行比较,如果匹配,我们将在 match 列下附加 yes
File1.xls(可以有空白单元格)
Hostname | IP Address
server1 | 192.168.1.1
server2 | 192.168.2.1
文件2.xls
Location | Hostname | IP Address | Match
Rack1 | server1 | 192.168.1.1 | Yes (the script will enter yes under match here)
Rack2 | server3 | 192.168.2.2 | (there will be no match here)
Rack3 | server2 | 192.168.2.1 | yes
有人可以在这里帮助我吗?可能是 python 或 perl,因为我需要在不同的平台上运行它,而不仅仅是 windows。