{"id":100577,"date":"2026-09-04T21:17:53","date_gmt":"2026-09-04T13:17:53","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/100577.html"},"modified":"2026-09-04T21:17:53","modified_gmt":"2026-09-04T13:17:53","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-python-%e6%b7%bb%e5%8a%a0%e5%92%8c%e7%bc%96%e8%be%91-excel-vba-%e5%ae%8f%ef%bc%88%e6%97%a0%e9%9c%80%e5%ae%89%e8%a3%85-excel%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/100577.html","title":{"rendered":"\u5982\u4f55\u4f7f\u7528 Python \u6dfb\u52a0\u548c\u7f16\u8f91 Excel VBA \u5b8f\uff08\u65e0\u9700\u5b89\u88c5 Excel\uff09"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" alt=\"Python \u6dfb\u52a0\u4e0e\u4fee\u6539 Excel VBA \u5b8f\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131751-6a9ac4ffe6107.png\" \/><\/p>\n<p>\u6709\u4e9b\u65f6\u5019&#xff0c;\u6211\u4eec\u9700\u8981\u5728 Linux\u3001\u5bb9\u5668\u6216\u4e91\u73af\u5883\u4e2d\u4fee\u6539 Excel \u6587\u4ef6\u4e2d\u7684 VBA\u00a0\u5b8f\u3002\u4f20\u7edf\u7684 openpyxl \u65e0\u6cd5\u5199\u5165\u5b8f\u4ee3\u7801&#xff0c;\u800c win32com \u53c8\u53ea\u80fd\u5728 Windows \u4e0b\u8fd0\u884c\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u4e00\u79cd\u8131\u79bb Excel \u8fd0\u884c\u73af\u5883\u7684\u514d\u5b89\u88c5\u65b9\u6848&#xff1a;\u76f4\u63a5\u5728\u00a0Python \u4e2d\u5b9e\u73b0 VBA \u5b8f\u4ee3\u7801\u7684\u6dfb\u52a0\u3001\u4fee\u6539\u548c\u5220\u9664&#xff0c;\u4e3b\u8981\u6db5\u76d6\u5185\u5bb9\u5982\u4e0b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u73af\u5883\u51c6\u5907<\/p>\n<\/li>\n<li>\n<p>\u7406\u89e3 4 \u79cd VBA \u6a21\u5757\u7c7b\u578b<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528 Python \u7ed9\u00a0Excel \u6587\u4ef6\u6dfb\u52a0 VBA \u5b8f<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528 Python \u4fee\u6539 Excel \u4e2d\u5df2\u6709\u7684 VBA \u4ee3\u7801<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528 Python \u5220\u9664 Excel VBA \u5b8f<\/p>\n<\/li>\n<li>\n<p>\u603b\u7ed3<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87\">\u73af\u5883\u51c6\u5907<\/h3>\n<p>\u8981\u5728\u4e0d\u8c03\u7528 Office COM \u63a5\u53e3\u7684\u524d\u63d0\u4e0b\u89e3\u6790 .xlsm\u00a0\u6216 .xlsb\u00a0\u7684\u4e8c\u8fdb\u5236\u7ed3\u6784&#xff0c;\u9700\u8981\u501f\u52a9\u80fd\u76f4\u63a5\u8bfb\u5199 VBA Project \u7684\u5e95\u5c42\u5e93\u3002 \u672c\u6587\u4f7f\u7528 Spire.XLS for Python&#xff0c;\u5b83\u662f\u4e00\u4e2a\u72ec\u7acb\u7684 Excel \u5904\u7406\u5f15\u64ce&#xff0c;\u5b8c\u5168\u8131\u79bb Office \u4f9d\u8d56&#xff0c;\u975e\u5e38\u9002\u5408\u90e8\u7f72\u5728 Linux\u3001\u4e91\u73af\u5883\u6216 Docker \u5bb9\u5668\u4e2d\u3002\u00a0<\/p>\n<p>\u4f60\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7 PyPI \u5b89\u88c5\u8be5\u5e93&#xff1a;<\/p>\n<p>pip install Spire.XLS<\/p>\n<p>\u6ce8\u610f&#xff1a; \u8fd9\u91cc\u64cd\u4f5c\u7684\u662f Excel \u6587\u4ef6\u4e2d\u7684 VBA \u4ee3\u7801&#xff0c;\u5e76\u4e0d\u4f1a\u5b9e\u9645\u6267\u884c VBA \u5b8f\u3002\u8981\u8fd0\u884c\u5b8f&#xff0c;\u4ecd\u7136\u9700\u8981 Microsoft Excel \u7b49\u652f\u6301\u6267\u884c\u00a0VBA \u7684\u73af\u5883\u3002<\/p>\n<h3 id=\"%E7%90%86%E8%A7%A3%204%20%E7%A7%8D%20VBA%20%E6%A8%A1%E5%9D%97%E7%B1%BB%E5%9E%8B\">\u7406\u89e3 4 \u79cd VBA \u6a21\u5757\u7c7b\u578b<\/h3>\n<p>\u901a\u8fc7\u4ee3\u7801\u6dfb\u52a0 VBA \u65f6&#xff0c;\u9700\u8981\u6839\u636e\u7528\u9014\u9009\u62e9\u5408\u9002\u7684\u6a21\u5757\u7c7b\u578b\u3002\u5728 Excel \u4e2d&#xff0c;\u4e0d\u540c\u7c7b\u578b\u7684 VBA \u6a21\u5757\u9002\u7528\u4e8e\u4e0d\u540c\u7684\u4ee3\u7801\u7ec4\u7ec7\u65b9\u5f0f\u548c\u6267\u884c\u573a\u666f\u3002<\/p>\n<ul>\n<li>\n<p>\u6807\u51c6\u6a21\u5757&#xff08;Standard Module&#xff09;<br \/>\n\u7528\u4e8e\u5b58\u653e\u901a\u7528 VBA \u4ee3\u7801\u3002\u666e\u901a\u5b8f\u3001\u53ef\u590d\u7528\u7684 Sub \u8fc7\u7a0b\u4ee5\u53ca\u4e0d\u4f9d\u8d56\u7279\u5b9a\u5de5\u4f5c\u7c3f\u5bf9\u8c61\u7684\u81ea\u5b9a\u4e49\u51fd\u6570&#xff08;UDF&#xff09;&#xff0c;\u901a\u5e38\u90fd\u653e\u5728\u6807\u51c6\u6a21\u5757\u4e2d\u3002<\/p>\n<\/li>\n<li>\n<p>\u6587\u6863\u6a21\u5757&#xff08;Document Module&#xff09;<br \/>\n\u4e0e\u5177\u4f53 Excel \u5bf9\u8c61\u76f4\u63a5\u5173\u8054&#xff0c;\u4f8b\u5982 ThisWorkbook \u6216\u67d0\u4e2a\u5de5\u4f5c\u8868\u3002\u901a\u5e38\u7528\u4e8e\u7f16\u5199\u4e8b\u4ef6\u4ee3\u7801&#xff0c;\u4f8b\u5982\u5de5\u4f5c\u7c3f\u6253\u5f00\u65f6\u81ea\u52a8\u6267\u884c\u7684\u4ee3\u7801&#xff0c;\u6216\u8005\u5de5\u4f5c\u8868\u5185\u5bb9\u53d1\u751f\u53d8\u5316\u65f6\u89e6\u53d1\u7684 Worksheet_Change \u4e8b\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<p>\u7c7b\u6a21\u5757&#xff08;Class Module&#xff09;<br \/>\n\u7528\u4e8e\u5b9a\u4e49\u81ea\u5b9a\u4e49 VBA \u7c7b&#xff0c;\u53ef\u4ee5\u521b\u5efa\u5305\u542b\u5c5e\u6027\u3001\u65b9\u6cd5\u548c\u4e8b\u4ef6\u7684\u53ef\u590d\u7528\u5bf9\u8c61\u3002<\/p>\n<\/li>\n<li>\n<p>\u7528\u6237\u7a97\u4f53&#xff08;UserForm&#xff09;<br \/>\n\u4e0e VBA \u81ea\u5b9a\u4e49\u754c\u9762\u76f8\u5173\u3002\u9664\u4e86\u4fdd\u5b58\u7a97\u4f53\u672c\u8eab\u7684\u754c\u9762\u8bbe\u8ba1&#xff0c;\u8fd8\u5305\u542b\u6309\u94ae\u5355\u51fb\u3001\u4e0b\u62c9\u6846\u9009\u62e9\u7b49\u63a7\u4ef6\u4e8b\u4ef6\u7684\u5904\u7406\u4ee3\u7801\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u5bf9\u4e8e\u666e\u901a\u7684\u901a\u7528\u5b8f&#xff0c;\u901a\u5e38\u4f7f\u7528\u6807\u51c6\u6a21\u5757\u5373\u53ef\u3002\u5982\u679c\u4ee3\u7801\u9700\u8981\u54cd\u5e94\u5de5\u4f5c\u7c3f\u6216\u5de5\u4f5c\u8868\u4e8b\u4ef6&#xff0c;\u5219\u5e94\u653e\u5728\u76f8\u5e94\u7684\u6587\u6863\u6a21\u5757\u4e2d\u3002<\/p>\n<h3 id=\"%E4%BD%BF%E7%94%A8%20Python%20%E7%BB%99%C2%A0Excel%20%E6%96%87%E4%BB%B6%E6%B7%BB%E5%8A%A0%20VBA%20%E5%AE%8F\">\u4f7f\u7528 Python \u7ed9\u00a0Excel \u6587\u4ef6\u6dfb\u52a0 VBA \u5b8f<\/h3>\n<p>\u5411 Excel \u5de5\u4f5c\u7c3f\u6dfb\u52a0 VBA \u5b8f\u7684\u6d41\u7a0b\u4e3b\u8981\u5206\u4e3a 3 \u6b65&#xff1a;<\/p>\n<li>\n<p>\u5728\u5de5\u4f5c\u7c3f\u00a0Modules \u96c6\u5408\u4e2d\u6dfb\u52a0\u65b0\u6a21\u5757&#xff0c;\u5e76\u901a\u8fc7 VbaModuleType \u679a\u4e3e\u6307\u5b9a\u6a21\u5757\u7c7b\u578b\u3002<\/p>\n<\/li>\n<li>\n<p>\u5c06 VBA \u6e90\u4ee3\u7801\u4ee5\u591a\u884c\u5b57\u7b26\u4e32\u7684\u5f62\u5f0f\u8d4b\u503c\u7ed9\u6a21\u5757\u7684 SourceCode \u5c5e\u6027\u3002<\/p>\n<\/li>\n<li>\n<p>\u5c06\u5de5\u4f5c\u7c3f\u4fdd\u5b58\u4e3a\u652f\u6301\u5b8f\u7684 Excel \u683c\u5f0f\u3002<\/p>\n<\/li>\n<p>\u4e0b\u9762\u7684\u793a\u4f8b\u6f14\u793a\u4e86\u5982\u4f55\u5728\u4e00\u4e2a Excel \u6587\u4ef6\u4e2d\u65b0\u5efa\u4e00\u4e2a\u6807\u51c6\u6a21\u5757&#xff0c;\u5e76\u6dfb\u52a0\u4e00\u6bb5\u81ea\u52a8\u586b\u5145\u6837\u5f0f\u4e0e\u6570\u636e\u7684 VBA \u811a\u672c&#xff1a;<\/p>\n<p>from spire.xls import Workbook, VbaModuleType, FileFormat<\/p>\n<p># \u521b\u5efa\u5de5\u4f5c\u7c3f<br \/>\nworkbook &#061; Workbook()<\/p>\n<p># \u521d\u59cb\u5316 VBA \u9879\u76ee<br \/>\nvba_project &#061; workbook.VbaProject<br \/>\nvba_project.Name &#061; &#034;SampleVBAMacro&#034;<\/p>\n<p># \u6dfb\u52a0\u4e00\u4e2a\u6807\u51c6\u6a21\u5757<br \/>\nvba_module &#061; vba_project.Modules.Add(&#034;SampleModule&#034;, VbaModuleType.Module)<\/p>\n<p># \u5199\u5165 VBA \u6e90\u4ee3\u7801<br \/>\nvba_module.SourceCode &#061; &#034;&#034;&#034;Sub ExampleMacro()<br \/>\n    Dim ws As Worksheet<br \/>\n    Dim i As Integer<\/p>\n<p>    &#039; \u83b7\u53d6\u5f53\u524d\u6d3b\u52a8\u5de5\u4f5c\u8868<br \/>\n    Set ws &#061; ActiveSheet<br \/>\n    ws.Cells.Clear<\/p>\n<p>    With ws<br \/>\n        &#039; \u5199\u5165\u8868\u5934<br \/>\n        .Range(&#034;A1:C1&#034;).Value &#061; Array(&#034;\u5e8f\u53f7&#034;, &#034;\u9879\u76ee\u540d\u79f0&#034;, &#034;\u91d1\u989d&#034;)<\/p>\n<p>        &#039; \u586b\u5145\u793a\u4f8b\u6570\u636e<br \/>\n        For i &#061; 1 To 10<br \/>\n            .Cells(i &#043; 1, 1).Value &#061; i<br \/>\n            .Cells(i &#043; 1, 2).Value &#061; &#034;\u9879\u76ee &#034; &amp; i<br \/>\n            .Cells(i &#043; 1, 3).Value &#061; i * 100<br \/>\n        Next i<\/p>\n<p>        &#039; \u81ea\u52a8\u8c03\u6574\u5217\u5bbd\u4e0e\u6837\u5f0f<br \/>\n        .Columns(&#034;A:C&#034;).AutoFit<br \/>\n        With .Range(&#034;A1:C1&#034;)<br \/>\n            .Font.Bold &#061; True<br \/>\n            .Interior.Color &#061; RGB(200, 220, 255)<br \/>\n        End With<br \/>\n        .Range(&#034;C2:C11&#034;).NumberFormat &#061; &#034;$#,##0.00&#034;<br \/>\n    End With<\/p>\n<p>    MsgBox &#034;\u6570\u636e\u586b\u5145\u5b8c\u6210&#xff01;&#034;, vbInformation, &#034;\u64cd\u4f5c\u63d0\u793a&#034;<br \/>\nEnd Sub&#034;&#034;&#034;<\/p>\n<p># \u5fc5\u987b\u4fdd\u5b58\u4e3a\u652f\u6301\u5b8f\u7684\u683c\u5f0f<br \/>\nworkbook.SaveToFile(&#034;AddVBAMacro.xlsm&#034;, FileFormat.Xlsm)<br \/>\nworkbook.Dispose()<\/p>\n<p>\u8fd9\u91cc\u5c06\u6587\u4ef6\u4fdd\u5b58\u4e3a .xlsm \u683c\u5f0f\u3002\u5982\u679c\u4fdd\u5b58\u4e3a\u666e\u901a\u7684 .xlsx \u6587\u4ef6&#xff0c;VBA \u4ee3\u7801\u5c06\u65e0\u6cd5\u4fdd\u7559\u3002\u9664\u4e86 .xlsm \u5916&#xff0c;\u8fd8\u53ef\u4ee5\u4fdd\u5b58\u4e3a\u5176\u4ed6\u652f\u6301 VBA \u5b8f\u7684 Excel \u683c\u5f0f&#xff0c;\u4f8b\u5982&#xff1a;<\/p>\n<ul>\n<li>\n<p>.xlsb \u2014 Excel \u4e8c\u8fdb\u5236\u5de5\u4f5c\u7c3f<\/p>\n<\/li>\n<li>\n<p>.xls \u2014 \u65e7\u7248 Excel \u5de5\u4f5c\u7c3f<\/p>\n<\/li>\n<li>\n<p>.xltm \u2014 \u542f\u7528\u5b8f\u7684 Excel \u6a21\u677f<\/p>\n<\/li>\n<\/ul>\n<p>\u5bf9\u4e8e\u76ee\u524d\u5e38\u89c1\u7684\u542f\u7528\u5b8f\u7684 Excel \u5de5\u4f5c\u7c3f&#xff0c;.xlsm \u4ecd\u7136\u662f\u6700\u5e38\u7528\u7684\u683c\u5f0f\u3002<\/p>\n<h3 id=\"%E4%BD%BF%E7%94%A8%20Python%20%E4%BF%AE%E6%94%B9%20Excel%20%E4%B8%AD%E5%B7%B2%E6%9C%89%E7%9A%84%20VBA%20%E4%BB%A3%E7%A0%81\">\u4f7f\u7528 Python \u4fee\u6539 Excel \u4e2d\u5df2\u6709\u7684 VBA \u4ee3\u7801<\/h3>\n<p>\u5982\u679c\u9700\u8981\u4fee\u6539\u5df2\u6709\u5b8f&#xff0c;\u9996\u5148\u8981\u8bbf\u95ee\u5de5\u4f5c\u7c3f\u4e2d\u7684 VBA \u9879\u76ee&#xff0c;\u7136\u540e\u627e\u5230\u76ee\u6807\u6a21\u5757&#xff0c;\u5e76\u4fee\u6539\u5b83\u7684 SourceCode \u5c5e\u6027\u3002<\/p>\n<p>\u4ee5\u4e0b\u4ee3\u7801\u52a0\u8f7d\u521a\u624d\u751f\u6210\u7684\u00a0AddVBAMacro.xlsm \u6587\u4ef6&#xff0c;\u627e\u5230\u540d\u4e3a SampleModule \u7684\u6807\u51c6\u6a21\u5757&#xff0c;\u7136\u540e\u901a\u8fc7\u5b57\u7b26\u4e32\u66ff\u6362\u65b9\u6cd5&#xff0c;\u4fee\u6539\u91d1\u989d\u8ba1\u7b97\u65b9\u5f0f\u548c\u5b8f\u6267\u884c\u5b8c\u6210\u540e\u7684\u63d0\u793a\u4fe1\u606f\u3002<\/p>\n<p>from spire.xls import Workbook, FileFormat<\/p>\n<p>workbook &#061; Workbook()<br \/>\nworkbook.LoadFromFile(&#034;AddVBAMacro.xlsm&#034;)<\/p>\n<p>vba_project &#061; workbook.VbaProject<\/p>\n<p># \u6309\u540d\u79f0\u83b7\u53d6\u76ee\u6807\u6a21\u5757<br \/>\nvba_module &#061; vba_project.Modules[&#034;SampleModule&#034;]<\/p>\n<p># \u63d0\u53d6\u6e90\u7801\u5e76\u4f7f\u7528 Python \u5b57\u7b26\u4e32\u64cd\u4f5c\u8fdb\u884c\u66ff\u6362<br \/>\nsource_code &#061; vba_module.SourceCode<br \/>\nsource_code &#061; source_code.replace(&#034;i * 100&#034;, &#034;i * 150&#034;)<br \/>\nsource_code &#061; source_code.replace(&#034;\u6570\u636e\u586b\u5145\u5b8c\u6210&#xff01;&#034;, &#034;\u6570\u636e\u5df2\u66f4\u65b0&#xff01;&#034;)<\/p>\n<p># \u91cd\u65b0\u5199\u56de\u6a21\u5757<br \/>\nvba_module.SourceCode &#061; source_code<\/p>\n<p>workbook.SaveToFile(&#034;ModifyVBAMacro.xlsm&#034;, FileFormat.Xlsm)<br \/>\nworkbook.Dispose()<\/p>\n<p>\u8fd9\u79cd\u5b57\u7b26\u4e32\u66ff\u6362\u65b9\u5f0f\u9002\u5408\u53ea\u4fee\u6539\u5b8f\u4e2d\u7684\u67d0\u4e2a\u516c\u5f0f\u3001\u5e38\u91cf\u3001\u63d0\u793a\u4fe1\u606f\u6216\u5c11\u91cf\u4ee3\u7801\u3002\u5982\u679c\u9700\u8981\u5927\u5e45\u8c03\u6574\u5b8f\u903b\u8f91&#xff0c;\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4e3a SourceCode \u8d4b\u503c\u65b0\u7684\u5b8c\u6574 VBA \u4ee3\u7801&#xff0c;\u800c\u4e0d\u5fc5\u9010\u6bb5\u66ff\u6362\u3002<\/p>\n<h4 id=\"%E8%A1%A5%E5%85%85%EF%BC%9A%E5%A6%82%E4%BD%95%E4%BF%AE%E6%94%B9%E6%96%87%E6%A1%A3%E6%A8%A1%E5%9D%97%EF%BC%9F\">\u8865\u5145&#xff1a;\u5982\u4f55\u4fee\u6539\u6587\u6863\u6a21\u5757&#xff1f;<\/h4>\n<p>\u4e0a\u9762\u7684 Modules[&#034;\u540d\u79f0&#034;]\u00a0\u65b9\u6cd5\u9002\u7528\u4e8e\u83b7\u53d6\u6807\u51c6\u6a21\u5757\u3002\u5982\u679c\u4f60\u60f3\u4fee\u6539\u7684 VBA \u4ee3\u7801\u4f4d\u4e8e\u67d0\u4e2a\u5de5\u4f5c\u8868\u5173\u8054\u7684\u6587\u6863\u6a21\u5757\u4e2d&#xff0c;\u4f8b\u5982 Worksheet_Change\u3001Worksheet_Activate \u7b49\u5de5\u4f5c\u8868\u4e8b\u4ef6&#xff0c;\u5219\u9700\u8981\u5148\u83b7\u53d6\u5bf9\u5e94\u7684\u5de5\u4f5c\u8868\u5bf9\u8c61&#xff0c;\u901a\u8fc7 GetWorksheetModule() \u83b7\u53d6\u5b83\u7684 VBA \u6a21\u5757&#xff0c;\u518d\u901a\u8fc7 SourceCode \u5c5e\u6027\u4fee\u6539\u4ee3\u7801&#xff1a;<\/p>\n<p># \u83b7\u53d6\u7b2c\u4e00\u4e2a\u5de5\u4f5c\u8868\u5bf9\u5e94\u7684 VBA \u6587\u6863\u6a21\u5757<br \/>\nworksheet &#061; workbook.Worksheets[0]<br \/>\nvba_module &#061; vba_project.Modules.GetWorksheetModule(worksheet)<\/p>\n<p># \u540c\u6837\u901a\u8fc7 vba_module.SourceCode \u5373\u53ef\u8bfb\u53d6\u6216\u91cd\u5199<\/p>\n<h3 id=\"%E4%BD%BF%E7%94%A8%20Python%20%E5%88%A0%E9%99%A4%20Excel%20VBA%20%E5%AE%8F\">\u4f7f\u7528 Python \u5220\u9664 Excel VBA \u5b8f<\/h3>\n<p>\u5220\u9664 Excel \u5b8f\u6709 3 \u79cd\u65b9\u5f0f&#xff0c;\u5177\u4f53\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u53d6\u51b3\u4e8e\u4f60\u662f\u5426\u53ea\u60f3\u5220\u9664\u67d0\u4e00\u4e2a VBA \u6a21\u5757&#xff0c;\u8fd8\u662f\u5e0c\u671b\u6e05\u9664\u6574\u4e2a\u5de5\u4f5c\u7c3f\u4e2d\u7684\u6240\u6709\u5b8f\u3002<\/p>\n<h4 id=\"%E5%88%A0%E9%99%A4%E6%8C%87%E5%AE%9A%20VBA%20%E6%A8%A1%E5%9D%97\">\u5220\u9664\u6307\u5b9a VBA \u6a21\u5757<\/h4>\n<p>\u5982\u679c\u53ea\u9700\u8981\u5220\u9664\u67d0\u4e2a\u7279\u5b9a\u6a21\u5757&#xff0c;\u53ef\u4ee5\u6839\u636e\u6a21\u5757\u540d\u79f0\u5c06\u5176\u4ece Modules \u96c6\u5408\u4e2d\u79fb\u9664\u3002<\/p>\n<p>from spire.xls import *<\/p>\n<p>workbook &#061; Workbook()<br \/>\nworkbook.LoadFromFile(&#034;Sample.xlsm&#034;)<\/p>\n<p>vba_project &#061; workbook.VbaProject<\/p>\n<p>vba_project.Modules.Remove(&#034;SampleModule&#034;) # \u6309\u540d\u79f0\u7cbe\u51c6\u5220\u9664<\/p>\n<p>workbook.SaveToFile(&#034;RemoveModule.xlsm&#034;, FileFormat.Xlsm)<\/p>\n<p>workbook.Dispose()<\/p>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u9002\u5408\u5de5\u4f5c\u7c3f\u4e2d\u5305\u542b\u591a\u4e2a VBA \u6a21\u5757&#xff0c;\u800c\u53ea\u9700\u8981\u5220\u9664\u5176\u4e2d\u67d0\u4e2a\u4e0d\u518d\u4f7f\u7528\u7684\u6a21\u5757\u7684\u60c5\u51b5\u3002<\/p>\n<h4 id=\"%E6%B8%85%E9%99%A4%E6%89%80%E6%9C%89%E5%AE%8F%E4%BD%86%E4%BF%9D%E7%95%99%20.xlsm%20%E6%A0%BC%E5%BC%8F\">\u6e05\u9664\u6240\u6709\u5b8f\u4f46\u4fdd\u7559 .xlsm \u683c\u5f0f<\/h4>\n<p>\u6709\u65f6\u4e1a\u52a1\u6d41\u7a0b\u8981\u6c42\u8f93\u51fa\u6587\u4ef6\u5fc5\u987b\u4fdd\u6301 .xlsm \u6269\u5c55\u540d&#xff0c;\u4f46\u51fa\u4e8e\u5b89\u5168\u8003\u8651\u53c8\u4e0d\u5e0c\u671b\u91cc\u9762\u5e26\u4efb\u4f55\u53ef\u6267\u884c\u4ee3\u7801\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b&#xff0c;\u53ef\u4ee5\u5c06\u5de5\u4f5c\u7c3f\u7684 HasMacros \u5c5e\u6027\u8bbe\u7f6e\u4e3a False\u3002\u8bbe\u7f6e\u540e&#xff0c;\u6240\u6709\u5b8f\u4ee3\u7801\u5c06\u88ab\u79fb\u9664&#xff1a;<\/p>\n<p>from spire.xls import *<\/p>\n<p>workbook &#061; Workbook()<br \/>\nworkbook.LoadFromFile(&#034;Sample.xlsm&#034;)<\/p>\n<p># \u76f4\u63a5\u5c06\u5b8f\u6807\u8bb0\u8bbe\u4e3a False&#xff0c;\u5185\u90e8\u6240\u6709\u4ee3\u7801\u5c06\u88ab\u6e05\u7a7a<br \/>\nworkbook.HasMacros &#061; False<\/p>\n<p>workbook.SaveToFile(&#034;RemoveAllMacros.xlsm&#034;, FileFormat.Xlsm)<\/p>\n<h4>\u8f6c\u6362\u4e3a\u4e0d\u652f\u6301\u5b8f\u7684 .xlsx \u683c\u5f0f<\/h4>\n<p>\u5982\u679c\u6587\u4ef6\u5904\u7406\u5b8c\u540e\u53ea\u9700\u8981\u4f9b\u666e\u901a\u7528\u6237\u67e5\u770b\u3001\u7f16\u8f91\u6216\u5171\u4eab&#xff0c;\u5e76\u4e14\u540e\u7eed\u4e0d\u518d\u9700\u8981\u8fd0\u884c VBA&#xff0c;\u76f4\u63a5\u8f6c\u5b58\u4e3a .xlsx \u5373\u53ef\u3002\u7531\u4e8e .xlsx \u683c\u5f0f\u672c\u8eab\u4e0d\u652f\u6301 VBA \u9879\u76ee&#xff0c;\u56e0\u6b64\u5728\u8f6c\u6362\u540e\u5b8f\u5185\u5bb9\u4f1a\u81ea\u52a8\u88ab\u79fb\u9664&#xff1a;<\/p>\n<p>from spire.xls import *<\/p>\n<p>workbook &#061; Workbook()<br \/>\nworkbook.LoadFromFile(&#034;Sample.xlsm&#034;)<\/p>\n<p># \u8f6c\u5b58\u4e3a\u6807\u51c6 XLSX&#xff0c;\u5b8f\u81ea\u52a8\u4e22\u5931<br \/>\nworkbook.SaveToFile(&#034;MacroFreeWorkbook.xlsx&#034;, FileFormat.Version2016)<br \/>\nworkbook.Dispose()<\/p>\n<h3>\u603b\u7ed3<\/h3>\n<p>\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528 Python \u76f4\u63a5\u64cd\u4f5c Excel \u6587\u4ef6\u4e2d\u7684 VBA \u9879\u76ee&#xff0c;\u5305\u62ec\u6dfb\u52a0\u65b0\u7684 VBA \u6a21\u5757\u3001\u4fee\u6539\u5df2\u6709\u5b8f\u4ee3\u7801\u3001\u8bbf\u95ee\u5de5\u4f5c\u8868\u5bf9\u5e94\u7684\u6587\u6863\u6a21\u5757&#xff0c;\u4ee5\u53ca\u5220\u9664\u6307\u5b9a\u6a21\u5757\u6216\u6e05\u9664\u6574\u4e2a\u5de5\u4f5c\u7c3f\u4e2d\u7684\u5b8f\u3002<\/p>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u4e0d\u4f9d\u8d56 Microsoft Excel&#xff0c;\u4e5f\u4e0d\u9700\u8981\u901a\u8fc7 Windows COM \u63a5\u53e3\u8fdb\u884c\u81ea\u52a8\u5316&#xff0c;\u56e0\u6b64\u53ef\u4ee5\u5e94\u7528\u4e8e Linux\u3001\u670d\u52a1\u5668\u3001\u5bb9\u5668\u548c\u4e91\u73af\u5883\u4e2d\u7684 Excel \u6587\u4ef6\u5904\u7406\u6d41\u7a0b\u3002<\/p>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f&#xff0c;\u8fd9\u91cc\u7684\u91cd\u70b9\u662f\u63d2\u5165\u3001\u8bfb\u53d6\u6216\u4fee\u6539\u5de5\u4f5c\u7c3f\u4e2d\u4fdd\u5b58\u7684 VBA \u4ee3\u7801&#xff0c;\u800c\u4e0d\u662f\u6267\u884c\u5b8f\u672c\u8eab\u3002\u5b8f\u7684\u5b9e\u9645\u8fd0\u884c\u4ecd\u9700\u8981 Microsoft Excel \u7b49\u652f\u6301 VBA \u8fd0\u884c\u7684\u73af\u5883\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u4e9b\u65f6\u5019&#xff0c;\u6211\u4eec\u9700\u8981\u5728 Linux\u3001\u5bb9\u5668\u6216\u4e91\u73af\u5883\u4e2d\u4fee\u6539 Excel \u6587\u4ef6\u4e2d\u7684 VBA\u00a0\u5b8f\u3002\u4f20\u7edf\u7684 openpyxl \u65e0\u6cd5\u5199\u5165\u5b8f\u4ee3\u7801&#xff0c;\u800c win32com \u53c8\u53ea\u80fd\u5728 Windows \u4e0b\u8fd0\u884c\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u4e00\u79cd\u8131\u79bb Excel \u8fd0\u884c\u73af\u5883\u7684\u514d\u5b89\u88c5\u65b9\u6848&#xff1a;\u76f4\u63a5\u5728\u00a0Python \u4e2d\u5b9e\u73b0 VBA \u5b8f\u4ee3\u7801\u7684\u6dfb\u52a0\u3001\u4fee\u6539\u548c\u5220\u9664&#xff0c;\u4e3b\u8981\u6db5\u76d6\u5185\u5bb9\u5982\u4e0b&#xff1a;\u73af\u5883\u51c6\u5907\u7406\u89e3 4 \u79cd VBA \u6a21\u5757\u7c7b\u578b\u4f7f\u7528 Python \u7ed9\u00a0Excel \u6587\u4ef6\u6dfb\u52a0 VB<\/p>\n","protected":false},"author":2,"featured_media":100576,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6817,1374,81,190],"topic":[],"class_list":["post-100577","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-vba","tag-excel","tag-python","tag-190"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5982\u4f55\u4f7f\u7528 Python \u6dfb\u52a0\u548c\u7f16\u8f91 Excel VBA \u5b8f\uff08\u65e0\u9700\u5b89\u88c5 Excel\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/100577.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5982\u4f55\u4f7f\u7528 Python \u6dfb\u52a0\u548c\u7f16\u8f91 Excel VBA \u5b8f\uff08\u65e0\u9700\u5b89\u88c5 Excel\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6709\u4e9b\u65f6\u5019&#xff0c;\u6211\u4eec\u9700\u8981\u5728 Linux\u3001\u5bb9\u5668\u6216\u4e91\u73af\u5883\u4e2d\u4fee\u6539 Excel \u6587\u4ef6\u4e2d\u7684 VBA\u00a0\u5b8f\u3002\u4f20\u7edf\u7684 openpyxl \u65e0\u6cd5\u5199\u5165\u5b8f\u4ee3\u7801&#xff0c;\u800c win32com \u53c8\u53ea\u80fd\u5728 Windows \u4e0b\u8fd0\u884c\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u4e00\u79cd\u8131\u79bb Excel \u8fd0\u884c\u73af\u5883\u7684\u514d\u5b89\u88c5\u65b9\u6848&#xff1a;\u76f4\u63a5\u5728\u00a0Python \u4e2d\u5b9e\u73b0 VBA \u5b8f\u4ee3\u7801\u7684\u6dfb\u52a0\u3001\u4fee\u6539\u548c\u5220\u9664&#xff0c;\u4e3b\u8981\u6db5\u76d6\u5185\u5bb9\u5982\u4e0b&#xff1a;\u73af\u5883\u51c6\u5907\u7406\u89e3 4 \u79cd VBA \u6a21\u5757\u7c7b\u578b\u4f7f\u7528 Python \u7ed9\u00a0Excel \u6587\u4ef6\u6dfb\u52a0 VB\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/100577.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-04T13:17:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131751-6a9ac4ffe6107.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/100577.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/100577.html\",\"name\":\"\u5982\u4f55\u4f7f\u7528 Python \u6dfb\u52a0\u548c\u7f16\u8f91 Excel VBA \u5b8f\uff08\u65e0\u9700\u5b89\u88c5 Excel\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-04T13:17:53+00:00\",\"dateModified\":\"2026-09-04T13:17:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/100577.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/100577.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/100577.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5982\u4f55\u4f7f\u7528 Python \u6dfb\u52a0\u548c\u7f16\u8f91 Excel VBA \u5b8f\uff08\u65e0\u9700\u5b89\u88c5 Excel\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5982\u4f55\u4f7f\u7528 Python \u6dfb\u52a0\u548c\u7f16\u8f91 Excel VBA \u5b8f\uff08\u65e0\u9700\u5b89\u88c5 Excel\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/100577.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5982\u4f55\u4f7f\u7528 Python \u6dfb\u52a0\u548c\u7f16\u8f91 Excel VBA \u5b8f\uff08\u65e0\u9700\u5b89\u88c5 Excel\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6709\u4e9b\u65f6\u5019&#xff0c;\u6211\u4eec\u9700\u8981\u5728 Linux\u3001\u5bb9\u5668\u6216\u4e91\u73af\u5883\u4e2d\u4fee\u6539 Excel \u6587\u4ef6\u4e2d\u7684 VBA\u00a0\u5b8f\u3002\u4f20\u7edf\u7684 openpyxl \u65e0\u6cd5\u5199\u5165\u5b8f\u4ee3\u7801&#xff0c;\u800c win32com \u53c8\u53ea\u80fd\u5728 Windows \u4e0b\u8fd0\u884c\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u4e00\u79cd\u8131\u79bb Excel \u8fd0\u884c\u73af\u5883\u7684\u514d\u5b89\u88c5\u65b9\u6848&#xff1a;\u76f4\u63a5\u5728\u00a0Python \u4e2d\u5b9e\u73b0 VBA \u5b8f\u4ee3\u7801\u7684\u6dfb\u52a0\u3001\u4fee\u6539\u548c\u5220\u9664&#xff0c;\u4e3b\u8981\u6db5\u76d6\u5185\u5bb9\u5982\u4e0b&#xff1a;\u73af\u5883\u51c6\u5907\u7406\u89e3 4 \u79cd VBA \u6a21\u5757\u7c7b\u578b\u4f7f\u7528 Python \u7ed9\u00a0Excel \u6587\u4ef6\u6dfb\u52a0 VB","og_url":"https:\/\/www.wsisp.com\/helps\/100577.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-04T13:17:53+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131751-6a9ac4ffe6107.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/100577.html","url":"https:\/\/www.wsisp.com\/helps\/100577.html","name":"\u5982\u4f55\u4f7f\u7528 Python \u6dfb\u52a0\u548c\u7f16\u8f91 Excel VBA \u5b8f\uff08\u65e0\u9700\u5b89\u88c5 Excel\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-04T13:17:53+00:00","dateModified":"2026-09-04T13:17:53+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/100577.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/100577.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/100577.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5982\u4f55\u4f7f\u7528 Python \u6dfb\u52a0\u548c\u7f16\u8f91 Excel VBA \u5b8f\uff08\u65e0\u9700\u5b89\u88c5 Excel\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/100577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=100577"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/100577\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/100576"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=100577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=100577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=100577"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=100577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}