{"id":970751,"date":"2024-12-27T05:28:49","date_gmt":"2024-12-26T21:28:49","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/970751.html"},"modified":"2024-12-27T05:28:52","modified_gmt":"2024-12-26T21:28:52","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%85openpyxl","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/970751.html","title":{"rendered":"Python\u4e2d\u5982\u4f55\u5b89\u88c5openpyxl"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24193926\/f82278c7-2f07-4af5-b08b-e6ba3c772864.webp\" alt=\"Python\u4e2d\u5982\u4f55\u5b89\u88c5openpyxl\" \/><\/p>\n<p><p> \u5728Python\u4e2d\u5b89\u88c5openpyxl\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Python\u7684\u5305\u7ba1\u7406\u5de5\u5177pip\u6765\u5b9e\u73b0\u3002<strong>\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684Python\u73af\u5883\u5df2\u7ecf\u5b89\u88c5\u4e86pip\u5de5\u5177\uff0c\u7136\u540e\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u547d\u4ee4\uff1apip install openpyxl\u3002<\/strong> \u8fd9\u6837\u5c31\u53ef\u4ee5\u81ea\u52a8\u4e0b\u8f7d\u5e76\u5b89\u88c5openpyxl\u5e93\u3002\u6b64\u5916\uff0c\u786e\u4fdd\u7f51\u7edc\u8fde\u63a5\u6b63\u5e38\uff0c\u4ee5\u4fbfpip\u53ef\u4ee5\u8bbf\u95eePython Package Index (PyPI) \u6765\u4e0b\u8f7d\u5e93\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u5c55\u5f00\u5982\u4f55\u5728Python\u4e2d\u5b89\u88c5\u548c\u4f7f\u7528openpyxl\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001PYTHON\u73af\u5883\u51c6\u5907<\/p>\n<\/p>\n<p><p>\u5728\u5b89\u88c5openpyxl\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u786e\u4fdd\u4f60\u7684\u8ba1\u7b97\u673a\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u73af\u5883\u3002Python\u662f\u4e00\u79cd\u5e7f\u6cdb\u4f7f\u7528\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u5728\u5904\u7406\u6570\u636e\u3001\u8fdb\u884c\u79d1\u5b66\u8ba1\u7b97\u3001\u5f00\u53d1\u7f51\u7edc\u5e94\u7528\u7b49\u65b9\u9762\u5177\u6709\u5f88\u5f3a\u7684\u80fd\u529b\u3002\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u5b89\u88c5Python\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\u6700\u65b0\u7248\u672c\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u8bf7\u786e\u4fdd\u9009\u62e9\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u5c06\u4f7f\u4f60\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u548cpip\u5de5\u5177\u3002<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002\u5982\u679c\u6b63\u786e\u5b89\u88c5\uff0c\u547d\u4ee4\u884c\u5c06\u663e\u793a\u5f53\u524dPython\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528PIP\u5de5\u5177\u5b89\u88c5openpyxl<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u9a8c\u8bc1PIP\u5de5\u5177\u662f\u5426\u53ef\u7528<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>pip --version<\/code>\u6765\u68c0\u67e5pip\u5de5\u5177\u662f\u5426\u5df2\u6b63\u786e\u5b89\u88c5\u3002\u5982\u679c\u5b89\u88c5\u6210\u529f\uff0c\u547d\u4ee4\u884c\u4f1a\u663e\u793apip\u7684\u7248\u672c\u4fe1\u606f\u3002\u5982\u679c\u672a\u5b89\u88c5\uff0c\u4f60\u9700\u8981\u624b\u52a8\u5b89\u88c5pip\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\u83b7\u53d6\u76f8\u5173\u6307\u5357\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5openpyxl<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5openpyxl\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install openpyxl<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u4ecePython Package Index (PyPI) \u4e0b\u8f7d\u5e76\u5b89\u88c5openpyxl\u5e93\u3002\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0cpip\u5c06\u81ea\u52a8\u5904\u7406openpyxl\u7684\u4f9d\u8d56\u5173\u7cfb\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u5728Python\u4ea4\u4e92\u5f0f\u73af\u5883\u4e2d\u5bfc\u5165openpyxl\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import openpyxl<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u6ca1\u6709\u4efb\u4f55\u9519\u8bef\u4fe1\u606f\uff0c\u8bf4\u660eopenpyxl\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001OPENPYXL\u7684\u57fa\u672c\u4f7f\u7528<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u5f00\u59cb\u5728Python\u9879\u76ee\u4e2d\u4f7f\u7528openpyxl\u3002openpyxl\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u5e93\uff0c\u53ef\u4ee5\u7528\u4e8e\u8bfb\u53d6\u3001\u5199\u5165\u548c\u4fee\u6539Excel\u6587\u4ef6\uff08.xlsx\uff09\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u57fa\u672c\u7684\u4f7f\u7528\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u65b0\u7684Excel\u5de5\u4f5c\u7c3f<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528openpyxl\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u521b\u5efa\u65b0\u7684Excel\u5de5\u4f5c\u7c3f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from openpyxl import Workbook<\/p>\n<p>wb = Workbook()<\/p>\n<p>ws = wb.active<\/p>\n<p>ws.title = &quot;MySheet&quot;<\/p>\n<p>ws[&#39;A1&#39;] = &#39;Hello&#39;<\/p>\n<p>ws[&#39;B1&#39;] = &#39;World&#39;<\/p>\n<p>wb.save(&quot;example.xlsx&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u521b\u5efa\u4e86\u4e00\u4e2a\u65b0\u7684Excel\u5de5\u4f5c\u7c3f\uff0c\u5e76\u5728\u7b2c\u4e00\u4e2a\u5de5\u4f5c\u8868\u4e2d\u5199\u5165\u4e86\u201cHello\u201d\u548c\u201cWorld\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8bfb\u53d6Excel\u6587\u4ef6<\/strong><\/p>\n<\/p>\n<p><p>openpyxl\u4e5f\u53ef\u4ee5\u7528\u6765\u8bfb\u53d6\u73b0\u6709\u7684Excel\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from openpyxl import load_workbook<\/p>\n<p>wb = load_workbook(&quot;example.xlsx&quot;)<\/p>\n<p>ws = wb.active<\/p>\n<p>print(ws[&#39;A1&#39;].value)<\/p>\n<p>print(ws[&#39;B1&#39;].value)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u8bfb\u53d6\u4e86\u4e4b\u524d\u521b\u5efa\u7684example.xlsx\u6587\u4ef6\uff0c\u5e76\u6253\u5370\u51fa\u5355\u5143\u683cA1\u548cB1\u7684\u503c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4fee\u6539Excel\u6587\u4ef6<\/strong><\/p>\n<\/p>\n<p><p>\u4f60\u8fd8\u53ef\u4ee5\u4f7f\u7528openpyxl\u6765\u4fee\u6539Excel\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">ws[&#39;A2&#39;] = &#39;Python&#39;<\/p>\n<p>ws[&#39;B2&#39;] = &#39;Openpyxl&#39;<\/p>\n<p>wb.save(&quot;example.xlsx&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u5728\u5de5\u4f5c\u8868\u4e2d\u65b0\u589e\u4e86\u4e24\u884c\u6570\u636e\uff0c\u5e76\u4fdd\u5b58\u4e86\u4fee\u6539\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u5904\u7406\u590d\u6742\u7684Excel\u64cd\u4f5c<\/p>\n<\/p>\n<p><p>openpyxl\u4e0d\u4ec5\u9650\u4e8e\u7b80\u5355\u7684\u8bfb\u5199\u64cd\u4f5c\uff0c\u5b83\u8fd8\u652f\u6301\u8bb8\u591a\u590d\u6742\u7684Excel\u529f\u80fd\uff0c\u5982\u516c\u5f0f\u8ba1\u7b97\u3001\u56fe\u8868\u751f\u6210\u3001\u5355\u5143\u683c\u6837\u5f0f\u8bbe\u7f6e\u7b49\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u9ad8\u7ea7\u529f\u80fd\u7684\u4ecb\u7ecd\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u516c\u5f0f\u8ba1\u7b97<\/strong><\/p>\n<\/p>\n<p><p>\u5728openpyxl\u4e2d\uff0c\u4f60\u53ef\u4ee5\u5411\u5355\u5143\u683c\u4e2d\u5199\u5165\u516c\u5f0f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">ws[&#39;C1&#39;] = &#39;=SUM(A1:B1)&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0copenpyxl\u672c\u8eab\u4e0d\u4f1a\u8ba1\u7b97\u516c\u5f0f\u7ed3\u679c\u3002\u8981\u67e5\u770b\u516c\u5f0f\u8ba1\u7b97\u7ed3\u679c\uff0c\u901a\u5e38\u9700\u8981\u5728Excel\u5e94\u7528\u7a0b\u5e8f\u4e2d\u6253\u5f00\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u56fe\u8868\u751f\u6210<\/strong><\/p>\n<\/p>\n<p><p>openpyxl\u652f\u6301\u751f\u6210\u591a\u79cd\u7c7b\u578b\u7684\u56fe\u8868\uff0c\u4f8b\u5982\u67f1\u72b6\u56fe\u3001\u6298\u7ebf\u56fe\u7b49\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from openpyxl.chart import BarChart, Reference<\/p>\n<p>chart = BarChart()<\/p>\n<p>data = Reference(ws, min_col=1, min_row=1, max_col=2, max_row=2)<\/p>\n<p>chart.add_data(data, titles_from_data=True)<\/p>\n<p>ws.add_chart(chart, &quot;E5&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u5728\u5de5\u4f5c\u8868\u4e2d\u6dfb\u52a0\u4e86\u4e00\u4e2a\u67f1\u72b6\u56fe\uff0c\u6570\u636e\u6e90\u81eaA1:B2\u533a\u57df\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5355\u5143\u683c\u6837\u5f0f\u8bbe\u7f6e<\/strong><\/p>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u4f7f\u7528openpyxl\u6765\u8bbe\u7f6e\u5355\u5143\u683c\u7684\u6837\u5f0f\uff0c\u4f8b\u5982\u5b57\u4f53\u3001\u989c\u8272\u3001\u8fb9\u6846\u7b49\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from openpyxl.styles import Font, Color<\/p>\n<p>font = Font(name=&#39;Calibri&#39;, size=14, bold=True, color=Color(rgb=&#39;00FF0000&#39;))<\/p>\n<p>ws[&#39;A1&#39;].font = font<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u5c06A1\u5355\u5143\u683c\u7684\u5b57\u4f53\u8bbe\u7f6e\u4e3aCalibri\uff0c\u5927\u5c0f14\uff0c\u52a0\u7c97\uff0c\u5e76\u5c06\u989c\u8272\u8bbe\u4e3a\u7ea2\u8272\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u6ce8\u610f\u4e8b\u9879\u548c\u5e38\u89c1\u95ee\u9898<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u517c\u5bb9\u6027\u95ee\u9898<\/strong><\/p>\n<\/p>\n<p><p>Openpyxl\u4e13\u95e8\u7528\u4e8e\u5904\u7406.xlsx\u6587\u4ef6\uff0c\u5982\u679c\u9700\u8981\u5904\u7406.xls\u6587\u4ef6\uff08Excel 97-2003\u683c\u5f0f\uff09\uff0c\u9700\u8981\u4f7f\u7528\u5176\u4ed6\u5e93\uff0c\u5982xlrd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6027\u80fd\u95ee\u9898<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5927\u89c4\u6a21\u6570\u636e\u65f6\uff0copenpyxl\u53ef\u80fd\u4f1a\u9047\u5230\u6027\u80fd\u74f6\u9888\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u8003\u8651\u5206\u6279\u5904\u7406\u6570\u636e\u6216\u4f7f\u7528\u5176\u4ed6\u9ad8\u6548\u7684\u5e93\uff0c\u5982pandas\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9519\u8bef\u5904\u7406<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u64cd\u4f5cExcel\u6587\u4ef6\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u9519\u8bef\uff0c\u5982\u6587\u4ef6\u6743\u9650\u95ee\u9898\u3001\u8def\u5f84\u9519\u8bef\u7b49\u3002\u5efa\u8bae\u5728\u4ee3\u7801\u4e2d\u52a0\u5165\u9519\u8bef\u5904\u7406\u673a\u5236\uff0c\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>Openpyxl\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684Python\u5e93\uff0c\u5e7f\u6cdb\u7528\u4e8e\u5904\u7406Excel\u6587\u4ef6\u3002\u901a\u8fc7\u4f7f\u7528pip\u5de5\u5177\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5b89\u88c5\u548c\u914d\u7f6eopenpyxl\uff0c\u5e76\u4f7f\u7528\u5b83\u6267\u884c\u5404\u79cdExcel\u64cd\u4f5c\u3002\u65e0\u8bba\u662f\u7b80\u5355\u7684\u6570\u636e\u8bfb\u5199\uff0c\u8fd8\u662f\u590d\u6742\u7684\u516c\u5f0f\u8ba1\u7b97\u3001\u56fe\u8868\u751f\u6210\uff0copenpyxl\u90fd\u80fd\u6ee1\u8db3\u4f60\u7684\u9700\u6c42\u3002\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\uff0c\u4fdd\u6301\u4ee3\u7801\u7684\u6e05\u6670\u548c\u7b80\u6d01\uff0c\u5e76\u6ce8\u610f\u53ef\u80fd\u7684\u6027\u80fd\u95ee\u9898\u548c\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u8fd9\u5c06\u6709\u52a9\u4e8e\u4f60\u5145\u5206\u53d1\u6325openpyxl\u7684\u4f18\u52bf\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5b89\u88c5openpyxl\u5e93\uff1f<\/strong><br \/>\u8981\u5728Python\u4e2d\u5b89\u88c5openpyxl\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u7684\u5305\u7ba1\u7406\u5de5\u5177pip\u3002\u5728\u547d\u4ee4\u884c\u6216\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<code>pip install openpyxl<\/code>\u3002\u786e\u4fdd\u4f60\u7684Python\u73af\u5883\u5df2\u7ecf\u8bbe\u7f6e\u597d\uff0c\u5e76\u4e14pip\u5de5\u5177\u53ef\u7528\u3002\u5982\u679c\u9047\u5230\u6743\u9650\u95ee\u9898\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u52a0\u4e0a<code>--user<\/code>\u9009\u9879\u3002<\/p>\n<p><strong>openpyxl\u5e93\u6709\u4ec0\u4e48\u4e3b\u8981\u529f\u80fd\uff1f<\/strong><br \/>openpyxl\u662f\u4e00\u4e2a\u5f3a\u5927\u7684Python\u5e93\uff0c\u4e3b\u8981\u7528\u4e8e\u8bfb\u53d6\u548c\u5199\u5165Excel\u6587\u4ef6\uff08.xlsx\u683c\u5f0f\uff09\u3002\u5b83\u652f\u6301\u591a\u79cd\u529f\u80fd\uff0c\u5982\u521b\u5efa\u65b0\u7684Excel\u5de5\u4f5c\u7c3f\u3001\u4fee\u6539\u73b0\u6709\u5de5\u4f5c\u8868\u3001\u6dfb\u52a0\u516c\u5f0f\u3001\u7ed8\u5236\u56fe\u8868\u4ee5\u53ca\u683c\u5f0f\u5316\u5355\u5143\u683c\u7b49\u3002\u8fd9\u4f7f\u5f97openpyxl\u5728\u6570\u636e\u5206\u6790\u548c\u81ea\u52a8\u5316\u62a5\u544a\u751f\u6210\u65b9\u9762\u975e\u5e38\u6709\u7528\u3002<\/p>\n<p><strong>\u5728\u4f7f\u7528openpyxl\u65f6\uff0c\u5982\u4f55\u907f\u514d\u5e38\u89c1\u7684\u9519\u8bef\uff1f<\/strong><br \/>\u4f7f\u7528openpyxl\u65f6\uff0c\u5e38\u89c1\u7684\u9519\u8bef\u5305\u62ec\u6587\u4ef6\u8def\u5f84\u4e0d\u6b63\u786e\u3001\u6587\u4ef6\u683c\u5f0f\u4e0d\u517c\u5bb9\uff08\u5982\u5c1d\u8bd5\u6253\u5f00.xls\u6587\u4ef6\uff09\u4ee5\u53ca\u672a\u5b89\u88c5\u5e93\u7b49\u3002\u786e\u4fdd\u6587\u4ef6\u8def\u5f84\u6b63\u786e\u4e14\u6587\u4ef6\u683c\u5f0f\u4e3a.xlsx\uff1b\u540c\u65f6\u68c0\u67e5\u5e93\u662f\u5426\u5df2\u6210\u529f\u5b89\u88c5\u3002\u5982\u679c\u4ecd\u7136\u51fa\u73b0\u9519\u8bef\uff0c\u53ef\u4ee5\u901a\u8fc7\u67e5\u770b\u9519\u8bef\u4fe1\u606f\u548c\u6587\u6863\uff0c\u83b7\u53d6\u89e3\u51b3\u65b9\u6848\u548c\u793a\u4f8b\u4ee3\u7801\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u5b89\u88c5openpyxl\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Python\u7684\u5305\u7ba1\u7406\u5de5\u5177pip\u6765\u5b9e\u73b0\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684Pyth [&hellip;]","protected":false},"author":3,"featured_media":970755,"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\/970751"}],"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=970751"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/970751\/revisions"}],"predecessor-version":[{"id":970756,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/970751\/revisions\/970756"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/970755"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=970751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=970751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=970751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}