{"id":4173,"date":"2021-09-07T14:41:35","date_gmt":"2021-09-07T06:41:35","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=4173"},"modified":"2021-09-07T15:10:03","modified_gmt":"2021-09-07T07:10:03","slug":"excelcompare","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=4173","title":{"rendered":"\u6839\u636e\u540e\u7f00\u540d\uff0c\u8c03\u7528\u4e0d\u7528\u7684\u6bd4\u8f83\u5de5\u5177"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>@echo off\nchcp 65001\nset dir=%~dp0\nset fname=\"%dir%ExcelCompare.txt\"\nset file1=%~1\nset file2=%~2\nset spread_sheet_path=\"C:\\Program Files (x86)\\Microsoft Office\\Office15\\DCF\\SPREADSHEETCOMPARE.EXE\"\nset beyond_compare_path=\"C:\\Program Files (x86)\\Beyond Compare 3\\BCompare.exe\"\n\npushd \"%dir%\"\n\nset ext1=%file1:~-4%\nset ext2=%file2:~-4%\nfor %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do call set ext1=%%ext1:%%i=%%i%%\nfor %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do call set ext2=%%ext2:%%i=%%i%%\n\nset extc=\nif \"%ext1%\"==\"xlsx\" (\n  set extc=%extc%1\n)\nif \"%ext1%\"==\".xls\" (\n  set extc=%extc%1\n)\nif \"%ext2%\"==\"xlsx\" (\n  set extc=%extc%1\n)\nif \"%ext2%\"==\".xls\" (\n  set extc=%extc%1\n)\nif \"%extc%\"==\"11\" (\necho call spread sheet compare\necho %file1%> %fname%\necho %file2%>> %fname%\n%spread_sheet_path% %fname%\n)\n\nif \"%extc%\"==\"1\" (\necho call beyond compare 1\n%beyond_compare_path% \"%file1%\" \"%file2%\"\n)\n\nif \"%extc%\"==\"\" (\necho call beyond compare 2\n%beyond_compare_path% \"%file1%\" \"%file2%\"\n)\n\npopd\n\n\n-----------------------------------------------\n\u6ce8\u91ca\uff1a\n\n%str:~5%\n\u4ece\u7b2c0\u5f00\u59cb\uff0c\u622a\u53d65\u4e2a\n\n%str:~-5%\n\u5012\u6570\u622a\u53d65\u4e2a\n\nfor %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do call set SHEET_NAME_LOWER=%%SHEET_NAME_LOWER:%%i=%%i%%\n\u8f6c\u6362\u4e3a\u5c0f\u5199<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4173"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4173"}],"version-history":[{"count":5,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4173\/revisions"}],"predecessor-version":[{"id":4178,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4173\/revisions\/4178"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}