id: 453fc97fd00245a9af5f694f0cf63bec
parent_id: 
item_type: 1
item_id: c394994686af4daaa71c9be6a2adac3b
item_updated_time: 1764345470190
title_diff: "[{\"diffs\":[[1,\"用Python实现报表自动化(xlwings)\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":23}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>用Python实现报表自动化(xlwings)</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"4689\\\"></a>\\\r\\\n<h1>用Python实现报表自动化(xlwings)</h1>\\\r\\\n\\\r\\\n<div><span>\\\n  <div style=\\\"--en-clipped-content:simplified; --en-clipped-source-url:https://mp.weixin.qq.com/s?__biz=MjM5MTI3MzUwMA%253D%253D&amp;idx=2&amp;mid=2650109300&amp;sn=4add215ceed4d5cec45b705e9acefc6b; --en-clipped-source-title:用Python实现报表自动化(xlwings);\\\">\\\n<div><br/></div><div style=\\\"min-height: 8941px; font-size: 16px; display: block; min-width: 100%;\\\"> <div style=\\\"background-color:transparent;font:inherit;vertical-align:baseline;\\\"><div style=\\\"background-color:transparent;font:inherit;vertical-align:baseline;font-family:&quot;PT Serif&quot;;font-size:16px;line-height:1.5em;color:rgb(31, 9, 9);text-align:left;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;width:36em;z-index:200;padding-left:2em;padding-right:2em;margin-left:auto;margin-right:auto;position:relative;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;position:relative;margin-left:-25px;margin-right:25px;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;padding-top:0px;padding-bottom:9em;position:relative;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;position:relative;margin-bottom:0px;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\"><h1 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;border:0px;font:inherit;vertical-align:baseline;font-size:35px;font-weight:normal;line-height:35px;margin-bottom:20px;padding:0px;margin:0px;\\\"> 实战案例——用Python实现报表自动化 </h1><div style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;position:relative;height:1em;line-height:1;text-align:center;margin:0px;padding-top:1.5em;padding-bottom:1.5em;margin-bottom:0px;\\\"><div style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);position:absolute;left:-4em;top:50%;z-index:10;width:100%;padding-left:4em;padding-right:4em;height:0.1em;opacity:0.5;margin:0px;margin-bottom:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:-4em;top:50%;z-index:10;width:100%;padding-left:4em;padding-right:4em;height:0.1em;margin:0px;opacity:0.5;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"></span></div></div></div>\\\n          <div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">\\\n                                                \\\n                        <span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\">\\\n              <a style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\">\\\n                爱数据LoveData              </a>\\\n              \\\n            </span>\\\n            <em style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-style:italic;\\\">2022-04-08 12:00</em>\\\n          </div>\\\n\\\n          \\\n                                                    \\\n\\\n          \\\n                    \\\n                                        \\\n\\\n          \\\n                    \\\n\\\n          \\\n                              \\\n                                        \\\n                    \\\n                    \\\n          \\\n          \\\n            <div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640\\\" type=\\\"image/gif\\\" data-filename=\\\"640\\\" height=\\\"141\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"480\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">来  源：数据人创作者联盟</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [1]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"276\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"1080\\\"/></p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [2]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"70\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"189\\\"/></p></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">人生苦短，我用Python。</strong></p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">相信做过报表的都对其烦不胜烦，周报，月报，季报；一期期的报表，一次次的心酸泪，烦不胜烦。至于小编是怎么知道的，因为我也是这个苦逼报表大军的一员。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">是这样的，当时参与公司的一个项目，我的任务是出报表，听到任务时，心中顿时乐开了花，呜呼，这个简单，不就是出个报表吗。So easy！可拿到历史数据做成的表格顿时就不淡定了，一共是6个excel，每个excel是4-5个sheet，每个sheet里还有一堆花花绿绿的表格需要填写，心里顿时不淡定了。完成整个任务之后，唯一感觉到的是，<strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">痛苦麻木</strong>。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">之后通过网络查询资料，发现这个报表居然可以自动化。接着花了一个星期的时间将报表自动化，当最后一个表格自动化代码写完后，打开Python，运行程序，不得不说，一个字爽，再也不用一点一点的往sheet里弄数据了。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">好了，接下来就为大家介绍今天的主角——<strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\"><span style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:black;cursor:pointer;background-color:rgb(240, 241, 241);transition:background-color 0.4s ease 0s;font-weight:inherit;font-style:unset;-evernote-highlight:true;\\\" title=\\\"点击以取消高亮显示\\\">xlwings</span></strong>。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">先简单的看一下最终生成的表格效果吧。</p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [3]\\\" type=\\\"image/gif\\\" data-filename=\\\"640\\\" height=\\\"182\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"116\\\"/></div></div></div></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [4]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"194\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">下面我们就来看看这个案例吧。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">以下是我们的原始数据，一共以三个sheet，每个sheet，这三个sheet分别是原煤，原油，天然气的数据。指标有产量当期值，产量累计值，产量同比增长，产量累计增长。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">这些数据都是可以在<strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">国家统计局里下载</strong>出来的，有兴趣的小伙伴可以自行下载。这个案例是让我们将数据以上表格的形式输出，指标名称是白色，单元格是黑色，此外数据中，红色是大于平均值进行得标注，蓝色是小于平均值进行的标注，表格字体为宋体。</p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-top:1em;margin-bottom:0px;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [5]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"159\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div></div></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-top:1em;margin-bottom:0px;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [6]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"154\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div></div></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-top:1em;margin-bottom:0px;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [7]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"147\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div></div></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">首先呢，先导入相关库，用python读取原始数据。</p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><pre style=\\\"background-color:rgb(243, 242, 238);font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;width:auto;font-size:0.875em;line-height:1.71429em;\\\">import pandas as pd<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">import xlwings as xw</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">raw_coal=pd.read_excel(r'统计局数据.xlsx',sheet_name='原煤')</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">crude_oil=pd.read_excel(r'统计局数据.xlsx',sheet_name='原油')</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">natural_gas=pd.read_excel(r'统计局数据.xlsx',sheet_name='天然气')</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">data=pd.merge(raw_coal,crude_oil,on='指标')</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">data=pd.merge(data,natural_gas,on='指标')</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">finally_data=data[['指标','原煤产量当期值(万吨)','原油产量当期值(万吨)','天然气产量当期值(亿立方米)']]</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">print(finally_data)</code></pre></div><br/><br/></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-top:1em;margin-bottom:0px;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [8]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"161\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div></div></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">就数据而言，已经离我们要的最终表格差的不远了，就差一点点细节了。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">是时候上我们的主角xlwings，xlwings能够非常方便的读写excel文件中的数据，最重要的是它可以对单元的格式进行修改，可以与pandas无缝连接。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\">使用xlwings库创建一个excel工作簿，在工作簿中创建一个表，表的名称为finally_data。</p></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">然后将上面利用pandas整合的数据复制到finally_data表格中，当然了将数据复制到表格中，在此看来有三种方式。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">第一种：</strong>将一个数据看成一个单位，一个一个写入创建的表格中，此时需要注意的是，每一个数据在excel的位置和在dataframe表格中的位置，以免出现错误。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">第二种：</strong>将一行数据看成一个单位，此时需要注意的是，每行数据的第一个在excel中的位置，参考复制粘贴形式。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">第三种：</strong>将一张表的数据看成一个单位，本质上与第二种没什么区别，都是切片式传入数据，但是第三种方法是一二维数组的形式写入。</p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><pre style=\\\"background-color:rgb(243, 242, 238);font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;width:auto;font-size:0.875em;line-height:1.71429em;\\\"><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">wb=xw.Book()</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht=wb.sheets['Sheet1']</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.name='finally_data'</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">columns=list(finally_data.columns)##得到列名</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range('A1').value = columns####在第一行复制列名</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">##第一种方式，将一个数据为单位，一个个写入创建的表格中</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\"># for row in range(2,11):</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">#     for col in range(1,5):</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">#         sht.range(row,col).value =finally_data.iloc[row-2,col-1]</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">##第二中方式，将一行数据为单位，一行一行的写入创建的表格中</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\"># for i in range(0,len(finally_data)):</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">#     data_row=list(finally_data.iloc[i,:])</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">#     row=i+2</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">#     row_clo='A'+str(row)</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">#     sht.range(row_clo).value =data_row</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">#第三种方式，将一张表格为单位，直接写入创建的表格中</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">finally_data1=finally_data.values</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range('A2').value = finally_data1</code></pre></div><br/><br/><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-top:1em;margin-bottom:0px;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [9]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"272\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div></div></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\">三者均能达到我们想要结果，各有优劣，小编喜欢的是第三种。达到这一步的时候，剩下的就是对表格内单元格的格式进行修改了。</p></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">再对单元格进行修改之前，我们要先求出来原煤产量当期值，原油产量长期值，天然气产量当期值，这三列数据中大于平均值和小于平均值的数据在Dataframe的位置，同时得出该数据在excel的位置，方便在进行单元格的格式修改。</p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><pre style=\\\"background-color:rgb(243, 242, 238);font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;width:auto;font-size:0.875em;line-height:1.71429em;\\\"><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">describe=finally_data.describe()</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">avg=list(describe.loc['mean',:])</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">##计算大于均值的数在excel的位置</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">red_原煤=list(finally_data.index[finally_data['原煤产量当期值(万吨)']&gt;avg[0]])</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">red_position1=['B'+str(i+2) for i in red_原煤 ]</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">red_原油=list(finally_data.index[finally_data['原油产量当期值(万吨)']&gt;avg[1]])</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">red_position2=['C'+str(i+2) for i in red_原油 ]</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">red_天然气=list(finally_data.index[finally_data['天然气产量当期值(亿立方米)']&gt;avg[2]])</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">red_position3=['D'+str(i+2) for i in red_天然气 ]</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">red=red_position1+red_position2+red_position3</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">##计算小于均值的数在excel的位置</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">blue_原煤=list(finally_data.index[finally_data['原煤产量当期值(万吨)']&lt;avg[0]])&lt; p=&quot;&quot;&gt;</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">blue_position1=['B'+str(i+2) for i in blue_原煤 ]</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">blue_原油=list(finally_data.index[finally_data['原油产量当期值(万吨)']&lt;avg[1]])&lt; p=&quot;&quot;&gt;</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">blue_position2=['C'+str(i+2) for i in blue_原油 ]</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">blue_天然气=list(finally_data.index[finally_data['天然气产量当期值(亿立方米)']&lt;avg[2]])&lt; p=&quot;&quot;&gt;</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">blue_position3=['D'+str(i+2) for i in blue_天然气 ]</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">blue=blue_position1+blue_position2+blue_position3</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">print(red)</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">print(blue</code></pre></div><br/><br/><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [10]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"96\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"915\\\"/></div></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">终于所有的条件全部满足了，最后可以对表格的格式进行修改了。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">首先就是将字体全部改成宋体，同时在表格中有数据的区域加上边框。</p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><pre style=\\\"background-color:rgb(243, 242, 238);font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;width:auto;font-size:0.875em;line-height:1.71429em;\\\"><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">#区域内字体改变成宋体,加上边框</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">a_range = f'A1:D10'#区域</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range(a_range).api.Font.Name='宋体' #字体</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range(a_range).api.Borders(8).LineStyle = 1 #上边框</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range(a_range).api.Borders(9).LineStyle = 1 #下边框</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range(a_range).api.Borders(7).LineStyle = 1 #左边框</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range(a_range).api.Borders(10).LineStyle = 1 #右边框</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range(a_range).api.Borders(12).LineStyle = 1 #内横边框</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range(a_range).api.Borders(11).LineStyle = 1 #内纵边框</code></pre></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">第二步就是将第一行的字体变成白色，单元格填充黑色。</p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><pre style=\\\"background-color:rgb(243, 242, 238);font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;width:auto;font-size:0.875em;line-height:1.71429em;\\\"><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">#区域内字体颜色成白色，单元格变成黑色</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">b_range = f'A1:D1'#区域第一行</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range(b_range).api.Font.Color = 0xffffff</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range(b_range).color=(0, 0, 0)</code></pre></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">最后一步就是将大于均值的数据字体改成红色，小于均值的字体改成蓝色。然后在进行保存。</p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><pre style=\\\"background-color:rgb(243, 242, 238);font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;width:auto;font-size:0.875em;line-height:1.71429em;\\\"><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">#######在excel 表格里改变字体颜色</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">for i in red:</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range(i).api.Font.Color = 0x0000ff</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">for i in blue:</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">sht.range(i).api.Font.Color = 0xFF0000</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">wb.save('结果数据.xlsx')</code><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;line-height:1.71429em;font-size:1.15em;\\\">wb.close()</code></pre></div><br/><br/></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-top:1em;margin-bottom:0px;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [11]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"176\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div></div></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">结果出来后，符合我们的要求。</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\">本次案例完整结束，当然了真正入手一个完整的自动化报表项目，远不止这么简单，中间还会出现一下别的问题。</p></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">想要深入了解Python自动化还得多多学习！</p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">- END -</strong></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [12]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"14\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"28\\\"/></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">爱数据福利大放送</strong></p></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [13]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"14\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"28\\\"/></div></div></div></div></div></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">扫描/识别下方二维码后</p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">回复<strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">【p2】</strong>即可领取</p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\"><strong style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;\\\">《Python学习手册》第四版</strong></p></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [14]\\\" type=\\\"image/gif\\\" data-filename=\\\"640\\\" height=\\\"640\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"640\\\"/></div></div></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [15]\\\" type=\\\"image/jpeg\\\" data-filename=\\\"640\\\" height=\\\"330\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"330\\\"/></p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [16]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"64\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"64\\\"/><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [17]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"64\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"64\\\"/><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [18]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"64\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"64\\\"/><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [19]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"64\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"64\\\"/><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [20]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"64\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"64\\\"/></p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [21]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"393\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [22]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"399\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\"></p></div></div></div><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [23]\\\" type=\\\"image/jpeg\\\" data-filename=\\\"640\\\" height=\\\"440\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\" width=\\\"440\\\"/></p><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [24]\\\" type=\\\"image/gif\\\" data-filename=\\\"640\\\" height=\\\"245\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:1.5em;padding-top:1.5em;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:block;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;position:relative;margin-top:0px;padding-top:0px;\\\"><span style=\\\"font:inherit;position:absolute;left:25%;top:0px;z-index:10;width:50%;padding-left:0px;padding-right:0px;height:0.1em;margin:0px;opacity:0.25;display:none !important;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);\\\"> </span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"></p><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;text-align:center;margin-bottom:1em;margin-top:1em;\\\"><img src=\\\"用Python实现报表自动化(xlwings)_files/640 [25]\\\" type=\\\"image/png\\\" data-filename=\\\"640\\\" height=\\\"163\\\" style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:block;max-width:100%;\\\" width=\\\"576\\\"/></div><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:0px;\\\"></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div>\\\n</div>\\\n</span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":55979}]"
metadata_diff: {"new":{"id":"c394994686af4daaa71c9be6a2adac3b","parent_id":"061de1401cfc4cfaadf6e74e015970e9","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764345887233,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T16:20:26.193Z
created_time: 2025-11-28T16:20:26.193Z
type_: 13