{"id":1007201,"date":"2024-12-27T10:51:15","date_gmt":"2024-12-27T02:51:15","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1007201.html"},"modified":"2024-12-27T10:51:18","modified_gmt":"2024-12-27T02:51:18","slug":"python%e5%a6%82%e4%bd%95%e5%bc%80%e5%8f%91excel%e6%8f%92%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1007201.html","title":{"rendered":"python\u5982\u4f55\u5f00\u53d1excel\u63d2\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25083018\/b6085a14-3d75-48ae-b5e2-6f2003cd275f.webp\" alt=\"python\u5982\u4f55\u5f00\u53d1excel\u63d2\u4ef6\" \/><\/p>\n<p><p> <strong>\u5f00\u53d1Excel\u63d2\u4ef6\u7684\u4e3b\u8981\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528Python\u5e93\u5982xlwings\u548copenpyxl\u3001\u5229\u7528VBA\u8fdb\u884c\u5b8f\u7f16\u7a0b\u3001\u4f7f\u7528Python\u4e0eCOM\u63a5\u53e3\u7ed3\u5408\u3001\u521b\u5efa\u81ea\u5b9a\u4e49\u7684Excel\u51fd\u6570\u3002\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528xlwings\u5e93\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u76f4\u63a5\u4e0eExcel\u8fdb\u884c\u4ea4\u4e92\uff0c\u5e76\u4e14\u652f\u6301VBA\u5b8f\u7684\u529f\u80fd\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528xlwings\u5f00\u53d1\u4e00\u4e2a\u7b80\u5355\u7684Excel\u63d2\u4ef6\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5\u548c\u8bbe\u7f6ePython\u73af\u5883<\/p>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u5f00\u53d1\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u786e\u4fdd\u4f60\u7684\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5\u4e86Python\u548c\u76f8\u5e94\u7684\u5e93\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u63a8\u8350\u4f7f\u7528Anaconda\uff0c\u56e0\u4e3a\u5b83\u9644\u5e26\u4e86\u8bb8\u591a\u79d1\u5b66\u8ba1\u7b97\u548c\u6570\u636e\u5904\u7406\u7684\u5e93\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u73af\u5883\u7684\u8bbe\u7f6e\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5Python\u548cAnaconda<\/strong>\uff1a\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u5b89\u88c5Python\uff0c\u5efa\u8bae\u4ecePython\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5b89\u88c5\u5305\u8fdb\u884c\u5b89\u88c5\u3002\u800cAnaconda\u53ef\u4ee5\u5728\u5176\u5b98\u7f51\u4e0a\u4e0b\u8f7d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5xlwings\u5e93<\/strong>\uff1axlwings\u662f\u4e00\u4e2a\u975e\u5e38\u6d41\u884c\u7684Python\u5e93\uff0c\u7528\u4e8e\u4e0eExcel\u4ea4\u4e92\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u901a\u8fc7pip\u5b89\u88c5xlwings\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install xlwings<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8bbe\u7f6eExcel\u7684\u5b8f\u5b89\u5168\u6027<\/strong>\uff1a\u8981\u8fd0\u884cPython\u4ee3\u7801\u5e76\u4e0eExcel\u8fdb\u884c\u4ea4\u4e92\uff0c\u4f60\u9700\u8981\u5728Excel\u4e2d\u542f\u7528\u5b8f\u529f\u80fd\u3002\u5177\u4f53\u6b65\u9aa4\u662f\u6253\u5f00Excel\uff0c\u8fdb\u5165\u9009\u9879\uff0c\u627e\u5230\u4fe1\u4efb\u4e2d\u5fc3\u8bbe\u7f6e\uff0c\u5e76\u542f\u7528\u6240\u6709\u5b8f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u4f7f\u7528xlwings\u521b\u5efaExcel\u63d2\u4ef6<\/p>\n<\/p>\n<p><p>xlwings\u80fd\u591f\u8ba9\u4f60\u7528Python\u6765\u63a7\u5236Excel\uff0c\u5e76\u4e14\u53ef\u4ee5\u521b\u5efa\u81ea\u5b9a\u4e49\u7684Excel\u51fd\u6570\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u5982\u4f55\u4f7f\u7528xlwings\u5e93\u521b\u5efa\u4e00\u4e2aExcel\u63d2\u4ef6\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u4e00\u4e2aPython\u811a\u672c<\/strong>\uff1a\u9996\u5148\uff0c\u4f60\u9700\u8981\u521b\u5efa\u4e00\u4e2aPython\u811a\u672c\u6587\u4ef6\uff0c\u6bd4\u5982<code>my_excel_plugin.py<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528xlwings\u8fdb\u884cExcel\u64cd\u4f5c<\/strong>\uff1a\u5728\u8fd9\u4e2aPython\u811a\u672c\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528xlwings\u6765\u8bfb\u53d6\u548c\u5199\u5165Excel\u6570\u636e\u3002\u4f8b\u5982\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u51fd\u6570\uff0c\u5b83\u53ef\u4ee5\u8bfb\u53d6\u4e00\u4e2aExcel\u5355\u5143\u683c\u7684\u6570\u636e\uff0c\u5e76\u5728\u53e6\u4e00\u4e2a\u5355\u5143\u683c\u4e2d\u5199\u5165\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import xlwings as xw<\/p>\n<p>def my_function():<\/p>\n<p>    wb = xw.Book.caller()  # \u8fde\u63a5\u5230\u8c03\u7528\u6b64\u51fd\u6570\u7684Excel\u5de5\u4f5c\u7c3f<\/p>\n<p>    sheet = wb.sheets[0]   # \u9009\u62e9\u7b2c\u4e00\u4e2a\u5de5\u4f5c\u8868<\/p>\n<p>    value = sheet.range(&#39;A1&#39;).value  # \u8bfb\u53d6A1\u5355\u5143\u683c\u7684\u503c<\/p>\n<p>    sheet.range(&#39;B1&#39;).value = value * 2  # \u5c06\u503c\u7684\u4e24\u500d\u5199\u5165B1\u5355\u5143\u683c<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u521b\u5efaExcel\u52a0\u8f7d\u9879<\/strong>\uff1axlwings\u652f\u6301\u5c06Python\u811a\u672c\u4f5c\u4e3aExcel\u52a0\u8f7d\u9879\u3002\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u52a0\u8f7d\u9879\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">xlwings addin install<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u4e3a\u4f60\u7684Excel\u5b89\u88c5\u4e00\u4e2a\u65b0\u7684\u52a0\u8f7d\u9879\uff0c\u53ef\u4ee5\u901a\u8fc7Excel\u7684\u201c\u52a0\u8f7d\u9879\u201d\u9009\u9879\u5361\u8fdb\u884c\u8bbf\u95ee\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7ed1\u5b9a\u51fd\u6570\u5230Excel\u6309\u94ae<\/strong>\uff1a\u5728Excel\u4e2d\uff0c\u4f60\u53ef\u4ee5\u63d2\u5165\u4e00\u4e2a\u6309\u94ae\uff0c\u5e76\u5c06\u5176\u4e0ePython\u811a\u672c\u4e2d\u7684\u51fd\u6570\u7ed1\u5b9a\u3002\u63d2\u5165\u6309\u94ae\u540e\uff0c\u53f3\u952e\u5355\u51fb\u6309\u94ae\u5e76\u9009\u62e9\u201c\u5206\u914d\u5b8f\u201d\uff0c\u7136\u540e\u9009\u62e9\u4f60\u5728Python\u811a\u672c\u4e2d\u5b9a\u4e49\u7684\u51fd\u6570\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u5229\u7528VBA\u548cPython\u7ed3\u5408<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u76f4\u63a5\u4f7f\u7528xlwings\u5e93\uff0c\u4f60\u8fd8\u53ef\u4ee5\u901a\u8fc7VBA\u4e0ePython\u8fdb\u884c\u7ed3\u5408\u3002VBA\u662fExcel\u5185\u7f6e\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u5e38\u7528\u4e8e\u81ea\u52a8\u5316\u65e5\u5e38\u4efb\u52a1\u3002\u901a\u8fc7\u7ed3\u5408VBA\u548cPython\uff0c\u4f60\u53ef\u4ee5\u5b9e\u73b0\u66f4\u590d\u6742\u7684Excel\u529f\u80fd\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528VBA\u8c03\u7528Python\u811a\u672c<\/strong>\uff1a\u4f60\u53ef\u4ee5\u5728Excel\u7684VBA\u7f16\u8f91\u5668\u4e2d\u7f16\u5199VBA\u4ee3\u7801\u6765\u8c03\u7528Python\u811a\u672c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684VBA\u5b8f\u793a\u4f8b\uff0c\u5b83\u8c03\u7528Python\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-vba\">Sub CallPythonScript()<\/p>\n<p>    Dim objShell As Object<\/p>\n<p>    Set objShell = VBA.CreateObject(&quot;WScript.Shell&quot;)<\/p>\n<p>    objShell.Run &quot;python C:\\path\\to\\your\\script.py&quot;<\/p>\n<p>End Sub<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4e0eCOM\u63a5\u53e3\u7ed3\u5408<\/strong>\uff1a\u901a\u8fc7Python\u7684<code>win32com<\/code>\u5e93\uff0c\u4f60\u53ef\u4ee5\u4e0eExcel\u7684COM\u63a5\u53e3\u8fdb\u884c\u4ea4\u4e92\u3002\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5728\u4e0d\u4f7f\u7528xlwings\u7684\u60c5\u51b5\u4e0b\u5b9e\u73b0Excel\u7684\u81ea\u52a8\u5316\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import win32com.client<\/p>\n<p>excel = win32com.client.Dispatch(&quot;Excel.Application&quot;)<\/p>\n<p>wb = excel.Workbooks.Open(&#39;C:\\\\path\\\\to\\\\your\\\\excel\\\\file.xlsx&#39;)<\/p>\n<p>sheet = wb.Sheets(1)<\/p>\n<p>value = sheet.Cells(1, 1).Value<\/p>\n<p>sheet.Cells(1, 2).Value = value * 2<\/p>\n<p>wb.Save()<\/p>\n<p>wb.Close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u521b\u5efa\u81ea\u5b9a\u4e49\u7684Excel\u51fd\u6570<\/p>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u4f7f\u7528xlwings\u521b\u5efa\u81ea\u5b9a\u4e49\u7684Excel\u51fd\u6570\uff0c\u8fd9\u4e9b\u51fd\u6570\u53ef\u4ee5\u50cf\u5185\u7f6e\u7684Excel\u51fd\u6570\u4e00\u6837\u4f7f\u7528\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b9a\u4e49\u81ea\u5b9a\u4e49\u51fd\u6570<\/strong>\uff1a\u5728Python\u811a\u672c\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>xlwings.func<\/code>\u88c5\u9970\u5668\u6765\u5b9a\u4e49\u81ea\u5b9a\u4e49\u7684Excel\u51fd\u6570\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import xlwings as xw<\/p>\n<p>@xw.func<\/p>\n<p>def multiply_by_two(x):<\/p>\n<p>    return x * 2<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5728Excel\u4e2d\u4f7f\u7528\u81ea\u5b9a\u4e49\u51fd\u6570<\/strong>\uff1a\u4e00\u65e6\u5b9a\u4e49\u4e86\u81ea\u5b9a\u4e49\u51fd\u6570\u5e76\u8fd0\u884c\u4e86Python\u811a\u672c\uff0c\u4f60\u5c31\u53ef\u4ee5\u5728Excel\u5355\u5143\u683c\u4e2d\u8f93\u5165<code>=multiply_by_two(A1)<\/code>\uff0c\u5b83\u5c06\u8fd4\u56deA1\u5355\u5143\u683c\u7684\u503c\u7684\u4e24\u500d\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u8c03\u8bd5\u548c\u90e8\u7f72Excel\u63d2\u4ef6<\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1Excel\u63d2\u4ef6\u7684\u8fc7\u7a0b\u4e2d\uff0c\u8c03\u8bd5\u548c\u90e8\u7f72\u662f\u975e\u5e38\u91cd\u8981\u7684\u6b65\u9aa4\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5efa\u8bae\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8c03\u8bd5Python\u4ee3\u7801<\/strong>\uff1a\u5728Python\u4e2d\u8c03\u8bd5\u4ee3\u7801\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528IDE\uff08\u5982PyCharm\u6216VSCode\uff09\u4e2d\u7684\u8c03\u8bd5\u5de5\u5177\u6765\u9010\u6b65\u6267\u884c\u4ee3\u7801\u5e76\u68c0\u67e5\u53d8\u91cf\u503c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5904\u7406\u9519\u8bef\u548c\u5f02\u5e38<\/strong>\uff1a\u786e\u4fdd\u5728Python\u811a\u672c\u4e2d\u5904\u7406\u53ef\u80fd\u7684\u9519\u8bef\u548c\u5f02\u5e38\uff0c\u4ee5\u514d\u5728\u8fd0\u884c\u65f6\u5bfc\u81f4Excel\u5d29\u6e83\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u90e8\u7f72\u63d2\u4ef6<\/strong>\uff1a\u4e00\u65e6\u5f00\u53d1\u5b8c\u6210\uff0c\u53ef\u4ee5\u5c06Python\u811a\u672c\u548c\u76f8\u5173\u7684Excel\u6587\u4ef6\u6253\u5305\uff0c\u5e76\u901a\u8fc7\u5171\u4eab\u7f51\u7edc\u9a71\u52a8\u5668\u3001\u7535\u5b50\u90ae\u4ef6\u6216\u5176\u4ed6\u65b9\u5f0f\u8fdb\u884c\u5206\u53d1\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6587\u6863\u548c\u7528\u6237\u6307\u5357<\/strong>\uff1a\u7f16\u5199\u8be6\u7ec6\u7684\u6587\u6863\u548c\u7528\u6237\u6307\u5357\uff0c\u5e2e\u52a9\u7528\u6237\u4e86\u89e3\u5982\u4f55\u5b89\u88c5\u548c\u4f7f\u7528\u63d2\u4ef6\uff0c\u4ee5\u53ca\u5e38\u89c1\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u6210\u529f\u5730\u4f7f\u7528Python\u5f00\u53d1\u4e00\u4e2aExcel\u63d2\u4ef6\uff0c\u5e76\u5728Excel\u4e2d\u5b9e\u73b0\u81ea\u52a8\u5316\u548c\u6269\u5c55\u529f\u80fd\u3002\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u63d0\u9ad8\u4e86\u5de5\u4f5c\u6548\u7387\uff0c\u8fd8\u4f7f\u5f97\u6570\u636e\u5904\u7406\u548c\u5206\u6790\u53d8\u5f97\u66f4\u52a0\u7075\u6d3b\u548c\u5f3a\u5927\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u5f00\u53d1Excel\u63d2\u4ef6\uff1f<\/strong><br \/>\u8981\u4f7f\u7528Python\u5f00\u53d1Excel\u63d2\u4ef6\uff0c\u901a\u5e38\u53ef\u4ee5\u91c7\u7528<code>xlwings<\/code>\u3001<code>PyXLL<\/code>\u6216<code>openpyxl<\/code>\u7b49\u5e93\u3002<code>xlwings<\/code>\u5141\u8bb8\u4f60\u5c06Python\u51fd\u6570\u76f4\u63a5\u8c03\u7528\u5230Excel\u4e2d\uff0c\u5e76\u4e14\u53ef\u4ee5\u521b\u5efa\u81ea\u5b9a\u4e49\u7684Excel\u754c\u9762\u3002\u4f60\u9700\u8981\u5b89\u88c5\u76f8\u5173\u5e93\uff0c\u5e76\u901a\u8fc7\u8bbe\u7f6eExcel\u7684\u5f15\u7528\u6765\u5b9e\u73b0Python\u4e0eExcel\u7684\u4e92\u52a8\u3002\u5177\u4f53\u6b65\u9aa4\u5305\u62ec\u5b89\u88c5\u5e93\u3001\u7f16\u5199Python\u811a\u672c\u3001\u6ce8\u518cExcel\u63d2\u4ef6\u7b49\u3002<\/p>\n<p><strong>Python\u5f00\u53d1Excel\u63d2\u4ef6\u9700\u8981\u54ea\u4e9b\u57fa\u7840\u77e5\u8bc6\uff1f<\/strong><br \/>\u5728\u5f00\u53d1Excel\u63d2\u4ef6\u4e4b\u524d\uff0c\u638c\u63e1Python\u7f16\u7a0b\u57fa\u7840\u662f\u5fc5\u9700\u7684\u3002\u6b64\u5916\uff0c\u4e86\u89e3Excel\u7684\u57fa\u672c\u64cd\u4f5c\u3001VBA\uff08Visual Basic for Applications\uff09\u6709\u52a9\u4e8e\u4f60\u66f4\u597d\u5730\u7406\u89e3Excel\u7684\u63d2\u4ef6\u67b6\u6784\u3002\u719f\u6089\u76f8\u5173\u5e93\u7684\u4f7f\u7528\uff0c\u4f8b\u5982\u5982\u4f55\u7528<code>xlwings<\/code>\u4e0eExcel\u8fdb\u884c\u4ea4\u4e92\uff0c\u5c06\u5927\u5927\u63d0\u9ad8\u4f60\u7684\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<p><strong>\u5f00\u53d1Excel\u63d2\u4ef6\u540e\u5982\u4f55\u8fdb\u884c\u6d4b\u8bd5\u548c\u8c03\u8bd5\uff1f<\/strong><br \/>\u5728\u5b8c\u6210Excel\u63d2\u4ef6\u7684\u5f00\u53d1\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u5728Excel\u4e2d\u76f4\u63a5\u8c03\u7528\u63d2\u4ef6\u529f\u80fd\u8fdb\u884c\u6d4b\u8bd5\u3002\u4f7f\u7528Python\u7684\u8c03\u8bd5\u5de5\u5177\uff08\u5982<code>pdb<\/code>\uff09\u53ef\u4ee5\u5e2e\u52a9\u4f60\u9010\u6b65\u68c0\u67e5\u4ee3\u7801\u903b\u8f91\u3002\u6b64\u5916\uff0c\u5efa\u8bae\u7f16\u5199\u5355\u5143\u6d4b\u8bd5\u6765\u9a8c\u8bc1\u5404\u4e2a\u529f\u80fd\u6a21\u5757\u7684\u6b63\u786e\u6027\uff0c\u786e\u4fdd\u63d2\u4ef6\u5728\u4e0d\u540c\u60c5\u51b5\u4e0b\u90fd\u80fd\u7a33\u5b9a\u8fd0\u884c\u3002<\/p>\n<p><strong>\u63d2\u4ef6\u53d1\u5e03\u540e\u5982\u4f55\u66f4\u65b0\u548c\u7ef4\u62a4\uff1f<\/strong><br \/>\u53d1\u5e03Excel\u63d2\u4ef6\u540e\uff0c\u4fdd\u6301\u5176\u66f4\u65b0\u548c\u7ef4\u62a4\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u3002\u5b9a\u671f\u68c0\u67e5Python\u53ca\u5176\u4f9d\u8d56\u5e93\u7684\u7248\u672c\u66f4\u65b0\uff0c\u53ca\u65f6\u4fee\u590d\u53ef\u80fd\u51fa\u73b0\u7684bug\u3002\u6b64\u5916\uff0c\u6536\u96c6\u7528\u6237\u53cd\u9988\u5e76\u6839\u636e\u9700\u6c42\u8fdb\u884c\u529f\u80fd\u8fed\u4ee3\uff0c\u80fd\u591f\u63d0\u9ad8\u63d2\u4ef6\u7684\u7528\u6237\u4f53\u9a8c\u548c\u4f7f\u7528\u4ef7\u503c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5f00\u53d1Excel\u63d2\u4ef6\u7684\u4e3b\u8981\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528Python\u5e93\u5982xlwings\u548copenpyxl\u3001\u5229\u7528VBA\u8fdb\u884c\u5b8f\u7f16\u7a0b\u3001 [&hellip;]","protected":false},"author":3,"featured_media":1007209,"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\/1007201"}],"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=1007201"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1007201\/revisions"}],"predecessor-version":[{"id":1007213,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1007201\/revisions\/1007213"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1007209"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1007201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1007201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1007201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}