{"id":149347,"date":"2020-08-22T15:49:25","date_gmt":"2020-08-22T07:49:25","guid":{"rendered":"http:\/\/4563.org\/?p=149347"},"modified":"2020-08-22T15:49:25","modified_gmt":"2020-08-22T07:49:25","slug":"python-%e5%9c%a8-execl-%e4%b8%ad%e9%97%b4%e6%8f%92%e5%85%a5%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=149347","title":{"rendered":"Python \u5728 execl \u4e2d\u95f4\u63d2\u5165\u6570\u636e"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Python \u5728 execl \u4e2d\u95f4\u63d2\u5165\u6570\u636e               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : junniuLi <\/span>  <span><i><\/i> 10<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        python \u600e\u6837\u624d\u80fd\u5728 excel \u4e2d\u95f4\u63d2\u5165\u6570\u636e\uff0c\u5e76\u4e14\u683c\u5f0f\u4fdd\u6301\u4e0d\u53d8\uff1f\u6bd4\u5982\u5c31\u662f\u4e00\u4e2a execl \u6a21\u677f\uff0c\u6a21\u677f\u524d\u51e0\u884c\u662f\u4e00\u4e9b\u6807\u6ce8\uff0c\u6700\u540e\u51e0\u884c\u4e5f\u6709\u6807\u6ce8\uff0c\u6807\u6ce8\u90fd\u6e32\u67d3\u4e86\u683c\u5f0f\u5c31\u662f\u6709\u7684\u5408\u5e76\u4e86\uff0c\u6709\u7684\u6807\u6ce8\u4e86\u989c\u8272\u7b49\u3002\u4e2d\u95f4\u662f\u7a7a\u767d\u884c\uff0c\u7528\u6765\u63d2\u5165\u6570\u636e\uff0c\u6211\u73b0\u5728\u7684\u95ee\u9898\u662f\u5728\u4e2d\u95f4\u63d2\u5165\u591a\u884c\u6570\u636e\uff0c\u4f46\u662f\u6570\u636e\u4e00\u591a\u4f1a\u8986\u76d6\u6389\u6700\u540e\u51e0\u884c\u6807\u6ce8\u7684\u683c\u5f0f\u3002\u5982\u4f55\u624d\u80fd\u505a\u5230\u53ea\u5728\u4e2d\u95f4\u63d2\u5165\u800c\u4fdd\u8bc1\u524d\u540e\u683c\u5f0f\u90fd\u4e0d\u53d8\uff1f      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>26<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3120068\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : fhsan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u53cd\u6b63\u4e0d\u4f1a\u7528 python \u641e excel \u683c\u5f0f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120069\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : junniuLi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @fhsan \u6211\u4e0d\u60f3\u6bcf\u6b21\u90fd\u5199\u4e00\u904d\u683c\u5f0f\u52a0\u5230\u540e\u9762\uff0c\u6240\u4ee5\u60f3\u627e\u4e2a\u53d6\u5de7\u7684\u65b9\u6cd5\uff0c\u4f46\u662f\u627e\u4e0d\u5230                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120070\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : BBrother <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/my.oschina.net\/u\/2996334\/blog\/3030991 <br \/>\u8fd9\u4e2a\u610f\u601d\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120071\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : junniuLi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @BBrother \u597d\u50cf\u4e0d\u662f\uff0c\u6211\u7684\u60f3\u6cd5\u5c31\u662f\u60f3\u5728\u4e2d\u95f4\u63d2\u6570\u636e\uff0c\u7c7b\u4f3c\u5728 excel \u4e2d\u589e\u52a0\u4e00\u884c\uff0c\u4e0b\u9762\u7684\u884c\u81ea\u52a8\u4e0b\u79fb\uff0c\u8fd9\u6837\u4e0d\u4f1a\u5f71\u54cd\u6700\u540e\u7684\u683c\u5f0f\u3002\u6211\u7528 openpyxl \u7684 inser_rows \uff08\uff09\u63d2\u5165\u7a7a\u884c\uff0c\u867d\u7136\u53ef\u4ee5\u4f7f\u6807\u6ce8\u7684\u90a3\u51e0\u884c\u5411\u4e0b\u79fb\u52a8\uff0c\u4f46\u662f\u6807\u6ce8\u7684\u683c\u5f0f\u8fd8\u662f\u4f1a\u88ab\u8986\u76d6\uff0c\u800c\u4e14\u5728\u539f\u6765\u7684\u6807\u6ce8\u7684\u4f4d\u7f6e\uff0c\u65b0\u589e\u7684\u7a7a\u884c\u4f1a\u88ab\u539f\u6765\u7684\u683c\u5f0f\u5f71\u54cd\uff0c\u4f8b\u5982\u539f\u6765\u5408\u5e76\u7684\u5217\uff0c\u65b0\u589e\u7684\u7a7a\u884c\u4e5f\u4f1a\u5408\u5e76\u3002 \u5c31\u5f88\u9ebb\u70e6~                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120072\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiaolinjia <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u7528 win32com \u5f04\u8fc7\u7c7b\u4f3c\u7684\u3002win32com \u6709\u6240\u6709 execl \u7684\u8fd9\u4e9b\u539f\u751f api \u3002\u5c31\u662f\u6587\u6863\u4e0d\u597d\u627e\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120073\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : BBrother <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @junniuLi \u522b\u7528 python \u4e86\uff0c\u76f4\u63a5\u5f55\u4e2a\u5b8f\u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120074\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jerfoxu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u80fd\u4e0d\u80fd\u628a\u6700\u540e\u7684\u6807\u6ce8\u6bcf\u6b21\u5f55\u5b8c\u6570\u636e\u590d\u5236\u4e0a\u53bb\u5462\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120075\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Vegetable <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u76f4\u63a5 insert_row \u4f1a\u8986\u76d6\u683c\u5f0f\u5417\uff1f\u8fd9\u548c\u6211\u8ba4\u77e5\u4e0d\u4e00\u6837\uff0c\u6211\u8bb0\u5f97\u6837\u5f0f\u90fd\u662f\u548c\u5355\u5143\u683c\u7ed1\u5b9a\u7684\uff0c\u4f60\u662f\u76f4\u63a5\u5728\u73b0\u6709\u5355\u5143\u683c\u4e0a\u5199\u5165\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120076\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : JCZ2MkKb5S8ZX9pq <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u8bd5\u8fc7\u597d\u51e0\u79cd\uff0c\u90fd\u4e0d\u7406\u60f3\u3002<br \/>\u6211\u7684\u60c5\u51b5\u662f excel \u5e26\u4e86\u4e0d\u5c11\u7279\u6b8a\u683c\u5f0f\uff0c\u6761\u4ef6\u683c\u5f0f\uff0c\u7b49\u7b49\u3002\u4e3b\u8981\u662f\u7528\u6765\u7ed9\u5ba2\u6237\u505a\u4e00\u4e2a GUI \u7684\u5c55\u793a\u3002<\/p>\n<p>\u76ee\u524d\u91c7\u53d6\u7684\u662f\u4e24\u79cd\u65b9\u5f0f\u3002<br \/>\u4e00\u79cd\u662f\u76f4\u63a5 python \u8f93\u51fa\u7c7b\u4f3c csv \u7684\u683c\u5f0f\uff0c\u516c\u5f0f\u5217\u5c31\u662f\u516c\u5f0f\u7684\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u628a\u6574\u4e2a csv \u76f4\u63a5\u5728 python \u590d\u5236\u5230\u526a\u5207\u677f\u540e\uff0c\u624b\u52a8\u9ecf\u8d34\u8fdb excel \u3002<br \/>\u53e6\u4e00\u79cd\u6bd4\u8f83\u5927\u578b\u7684\uff0c\u5e26\u56fe\u7247\u7b49\u7b49\u7684\u3002\u5c31\u662f\u76f4\u63a5\u7528 python \u5199\u4e00\u4e2a\u65b0\u7684 excel \uff08\u7528 xlsxwriter \uff09\uff0c\u4f46\u662f\u57fa\u672c\u4e0d\u5e26\u683c\u5f0f\uff0c\u5355\u72ec\u4fdd\u5b58\u3002\u7136\u540e\u624b\u52a8\u628a\u65b0\u7684 excel \u6570\u636e\u9ecf\u8d34\u8fdb\u6a21\u677f excel \u91cc\u3002<\/p>\n<p>&#8212;&#8212;&#8212;-<\/p>\n<p>\u76f4\u63a5\u5199 excel \u5e26\u683c\u5f0f\u7684\uff0c\u5c1d\u8bd5\u8fc7\u76f4\u63a5\u7528\u6a21\u5757\u8bfb\u53d6\u6a21\u677f excel \u6587\u4ef6\uff0c\u7136\u540e\u5f80\u6a21\u677f\u91cc\u5199\u5165\u6570\u636e\uff0c\u4f46\u5b9e\u9645\u4f1a\u6709\u8bb8\u591a\u95ee\u9898\u3002\u8ddf\u90a3\u4e2a\u6a21\u5757\u7684\u5f00\u53d1\u8005\u4ea4\u6d41\u8fc7\uff0c\u5bf9\u65b9\u610f\u601d\u4ed6\u7528\u7684\u662f\u4e00\u4e2a\u7b2c\u4e09\u65b9\u6807\u51c6\uff0c\u597d\u50cf\u662f open \u5565\u7684 table\/excel \u5927\u6982\u8fd9\u7c7b\u540d\u5b57\uff0c\u91cc\u9762\u652f\u6301\u7684\u7279\u6027\u6709\u9650\uff0c\u6709\u4e9b\u6bd4\u8f83\u51b7\u95e8\u7684 excel \u7279\u6027\u5c31\u6ca1\u8003\u8651\u53bb\u652f\u6301\u3002<\/p>\n<p>&#8212;&#8212;&#8212;-<\/p>\n<p>VBA \u561b\u5f04\u8fc7\u70b9\uff0c\u4f46\u6ca1\u627e\u5230\u6587\u6863\uff0c\u611f\u89c9\u5199 \/\u8c03\u8bd5\u8d77\u6765\u4e0d\u987a\u624b\uff0c\u5c31\u6ca1\u6df1\u5165\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120077\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : junniuLi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @jerfoxu \u627e\u4e0d\u5230\u7b80\u4fbf\u7684\u65b9\u6cd5\u7684\u8bdd\uff0c\u4e5f\u53ea\u80fd\u8fd9\u6837\u4e86~                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120078\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : JCZ2MkKb5S8ZX9pq <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             [openpyxl &#8211; A Python library to read\/write Excel 2010 xlsx\/xlsm files \u2014 openpyxl 3.0.5 documentation]( https:\/\/openpyxl.readthedocs.io\/en\/stable\/)<\/p>\n<p>\u4ee5\u524d\u8bd5\u8fc7\u7684\u4e00\u4e2a\u5de5\u5177 xlrd \u597d\u50cf\u66f4\u65b0\u4e86\uff0c\u6709\u7a7a LZ \u53ef\u4ee5\u8bd5\u8bd5\uff0c\u6211\u8e72\u4e00\u4e2a\u53cd\u9988\u3002<br \/>xlutils.copy \u6211\u4e5f\u7528\u8fc7\uff0c\u5f53\u65f6\u4e5f\u662f\u4e0d\u884c\u7684\uff0c\u4e0d\u77e5\u9053\u6709\u6ca1\u6709\u66f4\u65b0\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120079\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : junniuLi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Vegetable \u53ef\u80fd\u6211\u6ca1\u8bf4\u6e05\u695a\uff0c\u6211\u7684\u610f\u601d\u662f\u6bd4\u5982\u539f\u6765\u6807\u6ce8\u5185\u5bb9\u7684\u5728\u7b2c\u4e94\u884c\uff0c\u7b2c\u4e94\u884c\u683c\u5f0f\u4e3a 1-6 \u5217\u5408\u5e76\u540e\u5c45\u4e2d\uff0c\u7528 insert_rows \uff08\uff09 \u63d2\u5165\u4e00\u884c\u540e\uff0c\u73b0\u5728\u7684\u7b2c\u4e94\u884c\u4e3a\u65b0\u63d2\u5165\u7684\u7a7a\u767d\u884c\uff0c\u683c\u5f0f\u6ca1\u6709\u6539\u53d8\u8fd8\u662f\u5408\u5e76\u540e\u5c45\u4e2d\u3002\u4f46\u662f\u6211\u662f\u60f3\u8981\u7684\u6548\u679c\u662f\u63d2\u5165\u7684\u7a7a\u767d\u884c\u4fdd\u6301\u9ed8\u8ba4\u683c\u5f0f \uff0c\u5c31\u7c7b\u4f3c\u4e8e\u5728 excel \u4e2d\u7684\u7a7a\u767d\u884c\u70b9\u51fb\u63d2\u5165\uff0c\u751f\u6210\u4e00\u4e2a\u9ed8\u8ba4\u683c\u5f0f\u7684\u7a7a\u767d\u884c\uff0c\u800c\u4e0d\u662f\u751f\u6210\u4e00\u4e2a\u5408\u5e76\u540e\u7684\u7a7a\u767d\u884c~                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120080\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : junniuLi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @JCZ2MkKb5S8ZX9pq \u975e\u5e38\u611f\u8c22~                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120081\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : junniuLi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @JCZ2MkKb5S8ZX9pq xlutils.copy \u6211\u4e5f\u8bd5\u8fc7\uff0c\u4e5f\u4e0d\u884c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120082\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : pcbl <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u4e4b\u524d\u662f\u628a excel \u53e6\u5b58\u4e3a html \u4f5c\u4e3a\u6a21\u677f\uff0cpython \u4fee\u6539 html \u540e\uff0c\u6539\u6587\u4ef6\u540e\u7f00\u540d\u4e3a xls \u3002\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120083\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Vegetable <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @junniuLi #11 \u8bd5\u4e86\u4e00\u4e0b\uff0c\u5408\u5e76\u5355\u5143\u683c\u8fd9\u4e2a\u7684\u786e\u4e0d\u5c5e\u4e8e\u5355\u5143\u683c\u7684\u6837\u5f0f\uff0c\u4f1a\u88ab\u65b0\u63d2\u5165\u7684\u6570\u636e\u641e\u4e71\uff0c\u5e2e\u4e0d\u4e0a\u5fd9\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120084\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : JCZ2MkKb5S8ZX9pq <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @junniuLi \u4f60\u6709\u7a7a\u8bd5\u8bd5\u5427\uff0c\u6211\u8e72\u4e00\u4e2a\u3002<\/p>\n<p>\u6211\u4eec\u5e7f\u544a\u884c\u4e1a\uff0c\u5ba2\u6237\u95f4\u901a\u884c\u7684\u6587\u4ef6\u5c31\u662f excel\uff0c\u5ba2\u6237\u5927\u90fd\u6709\u4e8c\u6b21\u7f16\u8f91\u7684\u9700\u6c42\uff0c\u5f88\u65e0\u5948\u3002<br \/>\u6211\u6bd4\u8f83\u5e38\u7528\u7684\u5339\u914d\u4e0d\u5230\u7684\u90e8\u5206\u662f\u6761\u4ef6\u683c\u5f0f \/\u6570\u636e\u6761 \/\u8272\u9636\uff0c\u8fd9\u7c7b\u504f\u89c6\u89c9\u5448\u73b0\u7684\u3002\u4f46\u8868\u683c\u7ed3\u6784\u8fd8\u662f\u6bd4\u8f83\u4e25\u683c\u7684\u6570\u636e\u8868\uff0c\u7c7b\u4f3c sql\/access \u8fd9\u79cd\u7684\u3002<\/p>\n<p>\u50cf\u4f60\u5408\u5e76\u5355\u5143\u683c\u8fd9\u79cd\u73a9\u610f\u513f\u6211\u5012\u662f\u6ca1\u8bd5\u8fc7\uff0c\u4f46\u611f\u89c9\u652f\u6301\u5ea6\u53ef\u80fd\u4e0d\u4f1a\u5f88\u597d\u3002\u56e0\u4e3a\u8fd9\u662f\u66f4\u52a0\u4e0d\u50cf\u6570\u636e\u8868\u7684\u7528\u6cd5\u3002\u5982\u679c\u5ba2\u6237\u4e0d\u4ecb\u610f\uff0c\u53ef\u4ee5\u8003\u8651\u76f4\u63a5\u7f51\u9875\u3002<\/p>\n<p>\u53e6\u5916\u6211\u89c9\u5f97\u4f60\u7684\u8fd9\u4e2a\u9700\u6c42\uff08\u6211\u6ca1\u6709\u5f88\u660e\u767d\uff09\uff0c\u4e5f\u8bb8\u4e0d\u7528 python \u3002<br \/>\u6211\u4e0d\u77e5\u9053\u4f60\u5bf9 excel \u7684\u719f\u6089\u7a0b\u5ea6\u600e\u4e48\u6837\uff0c\u6211\u89e3\u91ca\u4e00\u4e2a\u6bd4\u8f83\u57fa\u7840\u7684\u5173\u4e8e [\u8868\u683c] \u7684\u90e8\u5206\u3002<\/p>\n<p>&#8212;&#8211;<\/p>\n<p>excel \u9ed8\u8ba4\u7684\u5176\u5b9e\u4e0d\u662f\u8868\u683c\uff0c\u6211\u8bb0\u5f97\u597d\u50cf\u662f\u53eb\u8868\u5355\uff08\u57fa\u672c\u4e0d\u7528\uff0c\u5fd8\u4e86\uff09\u3002<br \/>\u4f60\u968f\u4fbf\u5efa\u4e00\u70b9\u6570\u636e\uff0c5&#215;5 \u8fd9\u6837\uff0c\u7136\u540e\u5168\u9009\uff0c\u5230\u9876\u90e8 [\u63d2\u5165] \u9009\u9879\u5361\uff0c\u70b9\u8868\u683c\u3002\u7ecf\u8fc7\u8fd9\u6b65\u8f6c\u6362\uff0c\u8fd9\u91cc\u5f97\u5230\u7684\u5c31\u662f\u8868\u683c\u3002<br \/>\u7136\u540e\u4f60\u9009\u4e2d\u8868\u683c\u4e2d\u7684\u4efb\u4f55\u4e00\u4e2a\u5355\u5143\u683c\uff0c\u9876\u90e8\u5c31\u4f1a\u6709 [\u8bbe\u8ba1] \u9009\u9879\u5361\uff0c\u53ef\u4ee5\u9009\u89c6\u89c9\u6837\u5f0f\u548c\u6c47\u603b\u884c\u8fd9\u7c7b\u7684\u4e1c\u897f\u3002<\/p>\n<p>\u91cd\u8981\u7684\u6709\u51e0\u4e2a\u5730\u65b9\uff1a<br \/>1. \u8fd9\u6837\u7684\u8868\u683c\u91cc\uff0c\u516c\u5f0f\u7684\u5f15\u7528\u5199\u6cd5\u4f1a\u53d8\u6210\u5217\u540d\uff0c\u975e\u5e38\u65b9\u4fbf\u3002<br \/>2. \u76f4\u63a5\u9ed8\u8ba4\u5f85\u4e86\u7b5b\u9009\u5de5\u5177\uff08\u53ef\u4ee5\u5173\u95ed\uff09<br \/>3. ctrl+shift+\u52a0\u53f7\uff0c\u6dfb\u52a0\u884c\uff0c\u4f1a\u81ea\u52a8\u6269\u5c55\u8868\u683c\u5927\u5c0f\u3002\u800c\u4f60\u7684\u9700\u6c42\uff0c\u5982\u679c\u5728\u8fd9\u91cc\u9ecf\u8d34\u7684\u8bdd\uff0c\u5176\u5b9e\u5e95\u90e8\u7684\u5185\u5bb9\u662f\u4f1a\u81ea\u52a8\u4e0b\u79fb\u7684\u3002\uff08\u5f53\u7136\u5982\u679c\u4e0d\u662f\u8868\u683c\uff0c\u4e5f\u53ef\u4ee5\u9009\u62e9\u4e0b\u79fb\uff0c\u4f46\u8868\u683c\u65b9\u4fbf\u4e00\u70b9\u3002\uff09<br \/>4. \u4ece\u547d\u540d\u9009\u62e9\u5668\u91cc\uff0c\u53ef\u4ee5\u5bf9\u8868\u683c\u547d\u540d\uff08\u8de8\u8868\u683c\u5f15\u7528\u4f1a\u7528\u5230\uff09\u3002<\/p>\n<p>\u53cd\u6b63\u8868\u683c\u7279\u6027\u633a\u591a\u7684\uff0c\u4e5f\u86ee\u591a\u4eba\u4e0d\u77e5\u9053\u7684\u3002\u4f46\u719f\u6089\u4e4b\u540e\uff0c\u4e00\u822c\u5c31\u53ea\u4f1a\u7528\u5230\u8fd9\u79cd\u6bd4\u8f83\u4e25\u8c28\u7684\u6570\u636e\u8868\u683c\u3002\u5728\u719f\u6089\u8fd9\u4e9b\u7279\u6027\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u8003\u8651\u6839\u636e\u9700\u6c42\uff0c\u8c03\u6574\u4e00\u4e0b\u8868\u683c\u7684\u7ed3\u6784\u8bbe\u8ba1\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120085\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sniperhgy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @junniuLi \u5efa\u8bae\u8fd8\u662f\u7528 VBA \u6765\u5b8c\u6210\u8fd9\u7c7b Excel \u64cd\u4f5c\uff0c\u6bd4\u8f83\u65b9\u4fbf\uff0c\u6bd5\u7adf python \u662f\u80f6\u6c34\uff0c\u592a\u5b9a\u5236\u5316\u7684\u4e1c\u897f\uff0c\u6bd4\u4e0d\u8fc7\u539f\u751f\u81ea\u5e26\u7684\u3002\u5982\u679c\u89c9\u5f97 VBA \u7684\u5b66\u4e60\u6210\u672c\u5927\uff0c\u5c31\u5e72\u8106\u5f55\u4e00\u4e2a\u5b8f\uff0c\u7136\u540e\u6539\u6539\u5c31\u80fd\u7528\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120086\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : junniuLi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @pcbl \u6ca1\u6709\u60f3\u5230\u8fd9\u4e2a\u65b9\u6cd5\uff0c \u8bf7\u6559\u4e0b\uff0c\u8fd9\u6837\u662f\u600e\u4e48\u5f04\u7684\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120087\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : junniuLi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @JCZ2MkKb5S8ZX9pq                                                             <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120088\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : pcbl <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @junniuLi \u628a excel \u6a21\u677f\u53e6\u5b58\u4e3a html\uff0cpython \u53bb\u64cd\u4f5c html \u6bd4\u8f83\u5bb9\u6613\uff0c\u7136\u540e\u628a\u751f\u6210\u7684\u6587\u4ef6\u6539\u4e2a\u540e\u7f00\u540d\u53d8\u6210 xls \u6587\u4ef6\u3002<br \/>\u7f3a\u70b9\u662f\u6253\u5f00\u7684\u65f6\u5019 excel \u4f1a\u6709\u4e00\u4e2a\u786e\u8ba4\u6846                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120089\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiaolinjia <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             from win32com.client import Dispatch<\/p>\n<p>app = Dispatch(&#8216;Excel.Application&#8217;)<br \/>xl = app.Workbooks.Open(r&#8217;E:PyCharm_WorkSpaceaaaa111.xlsx&#8217;)<br \/>sht = xl.Worksheets(1)<br \/>sht.Rows(4).Insert()<br \/>xl.Save()<br \/>xl.Close(SaveChanges=0)<\/p>\n<p>\u6211\u8bf4\u7684 win32com \u5c45\u7136\u88ab\u65e0\u89c6\u4e86\uff0c\u53ea\u80fd\u4e0a\u4ee3\u7801\u4e86\u3002\u4e4b\u524d\u6211\u4e5f\u6709\u7c7b\u4f3c 12l \u7684\u9700\u6c42                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120090\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : junniuLi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xiaolinjia \u54c8\u54c8\u54c8\uff0c\u6ca1\u6709\u6ca1\u6709\uff0c\u6211\u53bb\u67e5\u4e86\uff0c\u53ea\u662f\u8fd8\u6ca1\u627e\u5230\u6587\u6863\uff0c\u8c22\u8c22\u5e26\u4f6c d=====(\uffe3\u25bd\uffe3*)b \u9876                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120091\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : junniuLi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xiaolinjia \u5e26\u4f6c\u725b\u6279\uff0c\u8fd9\u4e2a\u4ee3\u7801\u53ef\u4ee5\u5b9e\u73b0\u6211\u8bf4\u7684\u6548\u679c\uff0c\u679c\u7136\u7fa4\u9664\u6211\u4f6c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120092\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wq2016 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u96be\u5427\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3120093\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xyz1396 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Python \u8f93\u51fa csv \u518d\u7528\u5b8f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Python \u5728 execl \u4e2d\u95f4&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/149347"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=149347"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/149347\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=149347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=149347"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=149347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}