{"id":667112,"date":"2024-07-19T11:38:47","date_gmt":"2024-07-19T03:38:47","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/667112.html"},"modified":"2024-07-19T11:38:52","modified_gmt":"2024-07-19T03:38:52","slug":"excel%e6%96%87%e6%a1%a3%e6%80%8e%e4%b9%88%e5%88%a0%e9%99%a4%e5%8d%8f%e4%bd%9c%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/667112.html","title":{"rendered":"excel\u6587\u6863\u600e\u4e48\u5220\u9664\u534f\u4f5c\u8bb0\u5f55"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/07\/858672ed-0530-45dd-949d-54ee4aaca9a8.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"excel\u6587\u6863\u600e\u4e48\u5220\u9664\u534f\u4f5c\u8bb0\u5f55\" \/><\/p>\n<p><p><strong>\u534f\u4f5c\u8bb0\u5f55\u662fExcel\u6587\u6863\u4e2d\u7684\u91cd\u8981\u529f\u80fd\uff0c\u5b83\u53ef\u4ee5\u8ffd\u8e2a\u548c\u8bb0\u5f55\u7528\u6237\u5bf9\u6587\u6863\u7684\u4fee\u6539\u3002\u7136\u800c\uff0c\u6709\u65f6\u5019\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u5220\u9664\u8fd9\u4e9b\u534f\u4f5c\u8bb0\u5f55\uff0c\u4ee5\u4fdd\u62a4\u4e2a\u4eba\u9690\u79c1\u6216\u8005\u5176\u4ed6\u539f\u56e0\u3002\u8981\u5220\u9664Excel\u6587\u6863\u7684\u534f\u4f5c\u8bb0\u5f55\uff0c\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a\u4e00\u3001\u5173\u95ed\u5e76\u91cd\u65b0\u6253\u5f00\u6587\u6863\uff1b\u4e8c\u3001\u5220\u9664\u5e76\u91cd\u65b0\u4fdd\u5b58\u6587\u6863\uff1b\u4e09\u3001\u4f7f\u7528VBA\u5b8f\u4ee3\u7801\uff1b\u56db\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177\u3002<\/strong> <\/p>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c\u4f7f\u7528VBA\u5b8f\u4ee3\u7801\u662f\u4e00\u79cd\u6bd4\u8f83\u4e13\u4e1a\u548c\u6709\u6548\u7684\u65b9\u6cd5\u3002VBA\uff08Visual Basic for Applications\uff09\u662fMicrosoft Office\u7684\u4e00\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u53ef\u4ee5\u7528\u6765\u7f16\u5199\u81ea\u52a8\u5316\u811a\u672c\uff0c\u5bf9\u6587\u6863\u8fdb\u884c\u6279\u91cf\u5904\u7406\u3002\u4f7f\u7528VBA\u5b8f\u4ee3\u7801\u53ef\u4ee5\u975e\u5e38\u65b9\u4fbf\u5730\u5220\u9664Excel\u6587\u6863\u7684\u534f\u4f5c\u8bb0\u5f55\uff0c\u800c\u4e14\u7cbe\u786e\u5ea6\u9ad8\uff0c\u6548\u7387\u4e5f\u6bd4\u8f83\u9ad8\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528VBA\u5b8f\u4ee3\u7801\u5220\u9664Excel\u6587\u6863\u7684\u534f\u4f5c\u8bb0\u5f55\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e00\u3001\u5173\u95ed\u5e76\u91cd\u65b0\u6253\u5f00\u6587\u6863<\/strong><\/p>\n<\/p>\n<p><p>\u5173\u95ed\u5e76\u91cd\u65b0\u6253\u5f00\u6587\u6863\u662f\u6700\u76f4\u63a5\u4e5f\u662f\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u3002\u4f46\u8fd9\u79cd\u65b9\u6cd5\u53ea\u80fd\u5220\u9664\u4e34\u65f6\u7684\u534f\u4f5c\u8bb0\u5f55\uff0c\u4e5f\u5c31\u662f\u5728\u5f53\u524dExcel\u6587\u6863\u6253\u5f00\u671f\u95f4\u4ea7\u751f\u7684\u534f\u4f5c\u8bb0\u5f55\u3002\u4e00\u65e6\u5173\u95ed\u6587\u6863\uff0c\u8fd9\u4e9b\u4e34\u65f6\u8bb0\u5f55\u5c31\u4f1a\u88ab\u81ea\u52a8\u5220\u9664\u3002\u4f46\u662f\uff0c\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u80fd\u5220\u9664\u5728\u6587\u6863\u5173\u95ed\u4e4b\u524d\u5c31\u5df2\u7ecf\u5b58\u5728\u7684\u534f\u4f5c\u8bb0\u5f55\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e8c\u3001\u5220\u9664\u5e76\u91cd\u65b0\u4fdd\u5b58\u6587\u6863<\/strong><\/p>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7684\u539f\u7406\u662f\u901a\u8fc7\u5220\u9664\u539f\u59cb\u6587\u6863\uff0c\u7136\u540e\u91cd\u65b0\u4fdd\u5b58\u4e00\u4e2a\u65b0\u7684\u526f\u672c\uff0c\u4ee5\u6b64\u6765\u6e05\u9664\u534f\u4f5c\u8bb0\u5f55\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00\u9700\u8981\u6e05\u9664\u534f\u4f5c\u8bb0\u5f55\u7684Excel\u6587\u6863\u3002<\/li>\n<li>\u5728\u201c\u6587\u4ef6\u201d\u83dc\u5355\u4e2d\u9009\u62e9\u201c\u53e6\u5b58\u4e3a\u201d\uff0c\u7136\u540e\u9009\u62e9\u4e00\u4e2a\u65b0\u7684\u4f4d\u7f6e\u4fdd\u5b58\u6587\u6863\u3002<\/li>\n<li>\u5220\u9664\u539f\u59cb\u6587\u6863\u3002<\/li>\n<\/ol>\n<p><p>\u8fd9\u6837\uff0c\u65b0\u4fdd\u5b58\u7684\u6587\u6863\u5c31\u4e0d\u518d\u5305\u542b\u539f\u59cb\u6587\u6863\u7684\u534f\u4f5c\u8bb0\u5f55\u3002\u4f46\u662f\uff0c\u8fd9\u79cd\u65b9\u6cd5\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6587\u6863\u7684\u5176\u4ed6\u4fe1\u606f\u4e22\u5931\uff0c\u6bd4\u5982\u6587\u6863\u7684\u521b\u5efa\u65e5\u671f\u3001\u4f5c\u8005\u4fe1\u606f\u7b49\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e09\u3001\u4f7f\u7528VBA\u5b8f\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528VBA\u5b8f\u4ee3\u7801\u662f\u4e00\u79cd\u66f4\u4e13\u4e1a\u7684\u65b9\u6cd5\u3002\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u7cbe\u786e\u5730\u5220\u9664Excel\u6587\u6863\u7684\u534f\u4f5c\u8bb0\u5f55\uff0c\u800c\u4e14\u6548\u7387\u9ad8\uff0c\u4e0d\u4f1a\u5f71\u54cd\u6587\u6863\u7684\u5176\u4ed6\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u57fa\u672c\u7684VBA\u5b8f\u4ee3\u7801\u793a\u4f8b\uff0c\u7528\u4e8e\u5220\u9664Excel\u6587\u6863\u7684\u534f\u4f5c\u8bb0\u5f55\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-vba\">Sub ClearHistory()<\/p>\n<p>    Dim i As Long<\/p>\n<p>    For i = ActiveWorkbook.RevisionHistory.Count To 1 Step -1<\/p>\n<p>        ActiveWorkbook.RevisionHistory.Item(i).Delete<\/p>\n<p>    Next i<\/p>\n<p>End Sub<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u7684\u610f\u601d\u662f\uff0c\u4ece\u6587\u6863\u7684\u4fee\u8ba2\u5386\u53f2\u4e2d\u5220\u9664\u6240\u6709\u7684\u9879\u76ee\u3002\u8fd0\u884c\u8fd9\u4e2a\u5b8f\u4e4b\u540e\uff0cExcel\u6587\u6863\u7684\u534f\u4f5c\u8bb0\u5f55\u5c31\u4f1a\u88ab\u5168\u90e8\u5220\u9664\u3002<\/p>\n<\/p>\n<p><p><strong>\u56db\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177<\/strong><\/p>\n<\/p>\n<p><p>\u9664\u4e86\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u4e13\u95e8\u7684\u7b2c\u4e09\u65b9\u5de5\u5177\u6765\u5220\u9664Excel\u6587\u6863\u7684\u534f\u4f5c\u8bb0\u5f55\u3002\u8fd9\u4e9b\u5de5\u5177\u901a\u5e38\u63d0\u4f9b\u66f4\u591a\u7684\u9009\u9879\u548c\u66f4\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u6839\u636e\u9700\u8981\u9009\u62e9\u5220\u9664\u54ea\u4e9b\u534f\u4f5c\u8bb0\u5f55\uff0c\u751a\u81f3\u53ef\u4ee5\u8bbe\u7f6e\u5b9a\u65f6\u5220\u9664\u7b49\u9ad8\u7ea7\u529f\u80fd\u3002\u4f46\u662f\uff0c\u8fd9\u4e9b\u5de5\u5177\u901a\u5e38\u90fd\u662f\u4ed8\u8d39\u7684\uff0c\u800c\u4e14\u53ef\u80fd\u9700\u8981\u4e00\u4e9b\u6280\u672f\u77e5\u8bc6\u624d\u80fd\u6b63\u786e\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><p>\u603b\u7684\u6765\u8bf4\uff0c\u5220\u9664Excel\u6587\u6863\u7684\u534f\u4f5c\u8bb0\u5f55\u9700\u8981\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\u548c\u6761\u4ef6\u6765\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002\u5982\u679c\u53ea\u662f\u60f3\u5220\u9664\u4e34\u65f6\u7684\u534f\u4f5c\u8bb0\u5f55\uff0c\u90a3\u4e48\u5173\u95ed\u5e76\u91cd\u65b0\u6253\u5f00\u6587\u6863\u5c31\u8db3\u591f\u4e86\u3002\u5982\u679c\u9700\u8981\u5220\u9664\u6240\u6709\u7684\u534f\u4f5c\u8bb0\u5f55\uff0c\u5e76\u4e14\u4e0d\u4ecb\u610f\u4e22\u5931\u4e00\u4e9b\u5176\u4ed6\u4fe1\u606f\uff0c\u90a3\u4e48\u53ef\u4ee5\u9009\u62e9\u5220\u9664\u5e76\u91cd\u65b0\u4fdd\u5b58\u6587\u6863\u3002\u5982\u679c\u9700\u8981\u7cbe\u786e\u5730\u5220\u9664\u6307\u5b9a\u7684\u534f\u4f5c\u8bb0\u5f55\uff0c\u5e76\u4e14\u5bf9\u6548\u7387\u6709\u8981\u6c42\uff0c\u90a3\u4e48\u53ef\u4ee5\u9009\u62e9\u4f7f\u7528VBA\u5b8f\u4ee3\u7801\u3002\u5982\u679c\u9700\u8981\u66f4\u591a\u7684\u9009\u9879\u548c\u529f\u80fd\uff0c\u90a3\u4e48\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u5220\u9664\u534f\u4f5c\u8bb0\u5f55\u4f1a\u5f71\u54cd\u6587\u6863\u7684\u5185\u5bb9\u5417\uff1f<\/strong><br \/>\n\u4e0d\u4f1a\uff0c\u5220\u9664\u534f\u4f5c\u8bb0\u5f55\u53ea\u662f\u5220\u9664\u4e86\u6587\u6863\u7684\u5386\u53f2\u4fee\u6539\u8bb0\u5f55\uff0c\u4e0d\u4f1a\u5bf9\u6587\u6863\u7684\u5b9e\u9645\u5185\u5bb9\u4ea7\u751f\u4efb\u4f55\u5f71\u54cd\u3002<\/p>\n<p><strong>2. \u5220\u9664\u534f\u4f5c\u8bb0\u5f55\u540e\uff0c\u5176\u4ed6\u534f\u4f5c\u8005\u8fd8\u80fd\u770b\u5230\u6211\u4e4b\u524d\u7684\u4fee\u6539\u5417\uff1f<\/strong><br \/>\n\u5220\u9664\u534f\u4f5c\u8bb0\u5f55\u540e\uff0c\u5176\u4ed6\u534f\u4f5c\u8005\u5c06\u65e0\u6cd5\u770b\u5230\u4f60\u4e4b\u524d\u7684\u5177\u4f53\u4fee\u6539\u5185\u5bb9\uff0c\u4f46\u4ed6\u4eec\u4ecd\u7136\u53ef\u4ee5\u770b\u5230\u6587\u6863\u7684\u6700\u7ec8\u7248\u672c\u3002<\/p>\n<p><strong>3. \u5982\u4f55\u5220\u9664Excel\u6587\u6863\u7684\u534f\u4f5c\u8bb0\u5f55\uff1f<\/strong><br \/>\n\u8981\u5220\u9664Excel\u6587\u6863\u7684\u534f\u4f5c\u8bb0\u5f55\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff1a<\/p>\n<ol>\n<li>\u6253\u5f00Excel\u6587\u6863\u5e76\u8fdb\u5165\u201c\u6587\u4ef6\u201d\u83dc\u5355\u3002<\/li>\n<li>\u5728\u83dc\u5355\u4e2d\u9009\u62e9\u201c\u4fe1\u606f\u201d\u9009\u9879\u3002<\/li>\n<li>\u5728\u4fe1\u606f\u680f\u4e2d\uff0c\u627e\u5230\u201c\u4fee\u8ba2\u201d\u4e00\u680f\uff0c\u70b9\u51fb\u201c\u4fee\u8ba2\u201d\u4e0b\u62c9\u83dc\u5355\u4e2d\u7684\u201c\u5220\u9664\u534f\u4f5c\u8bb0\u5f55\u201d\u9009\u9879\u3002<\/li>\n<li>\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\uff0c\u9009\u62e9\u201c\u5220\u9664\u6240\u6709\u534f\u4f5c\u8bb0\u5f55\u201d\u5e76\u786e\u8ba4\u3002<\/li>\n<li>\u4fdd\u5b58\u6587\u6863\u540e\uff0c\u534f\u4f5c\u8bb0\u5f55\u5c06\u88ab\u6c38\u4e45\u5220\u9664\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"\u534f\u4f5c\u8bb0\u5f55\u662fExcel\u6587\u6863\u4e2d\u7684\u91cd\u8981\u529f\u80fd\uff0c\u5b83\u53ef\u4ee5\u8ffd\u8e2a\u548c\u8bb0\u5f55\u7528\u6237\u5bf9\u6587\u6863\u7684\u4fee\u6539\u3002\u7136\u800c\uff0c\u6709\u65f6\u5019\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u5220\u9664\u8fd9\u4e9b\u534f\u4f5c [&hellip;]","protected":false},"author":3,"featured_media":667120,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/667112"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=667112"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/667112\/revisions"}],"predecessor-version":[{"id":667123,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/667112\/revisions\/667123"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/667120"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=667112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=667112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=667112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}