head_style = self.workbook.add_format({"bold": True, "bg_color": "yellow", "align": "center", "font": 13}
时间: 2023-09-10 13:08:54 浏览: 145
head_style = self.workbook.add_format({"bold": True, "bg_color": "yellow", "align": "center", "font": 13}) 这段代码是用于设置Excel表格的样式。通过调用`self.workbook.add_format()`方法创建一个格式对象,然后通过传入一个字典参数来设置该格式对象的属性。在这个字典中,"bold"属性被设置为True,表示文本加粗;"bg_color"属性被设置为"yellow",表示背景颜色为黄色;align"属性被设置为"center",表示文本居中对齐;"font"属性被设置为13,表示字体大小为13。因此,head_style就是一个具有指定样式的格式对象。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [python csv统计某一列的频率,插入图表](https://blog.csdn.net/weixin_39609953/article/details/113521077)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [用django实现一个资产管理的系统](https://blog.csdn.net/weixin_34162401/article/details/93675041)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文