当前位置:网站首页>Openpyxl border
Openpyxl border
2022-07-29 01:28:00 【Struggling migrant workers】
List of articles
Code
import openpyxl
from openpyxl.styles import Border,Side
# Import fill class PatternFill
wb = openpyxl.load_workbook('/Users/test0712.xlsx')
ws = wb['Sheet1']
max_rows = ws.max_row # Get the largest row
max_columns = ws.max_column # Get the largest column
borders = Border(left=Side(style='thick'),bottom=Side(style='thick'),right=Side(style='thick'),top=Side(style='thick')) # Set the fill color to pink
# openpyxl Subscript from 1 Start
for i in range(1, max_rows + 1):
for j in range(1, max_columns + 1):
ws.cell(i, j).border = borders
wb.save('/Users/test0712.xlsx')
Before filling

After filling

边栏推荐
- Recommended Spanish translation of Beijing passport
- SQL question brushing: find the current salary details and department number Dept_ no
- A ten thousand word blog post takes you into the pit. Reptiles are a dead end [ten thousand word pictures]
- nep 2022 cat
- log4j动态加载配置文件
- 嵌入式分享合集23
- C语言300行代码实现扫雷(可展开+可标记+可更改困难级别)
- This article enables you to understand the underlying principle of MySQL- Internal structure, index, lock, cluster
- Bracket matching test
- 转:认知亚文化
猜你喜欢

PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益

Summary of process and thread knowledge points 2
![[Jenkins' notes] introduction, free space; Continuous integration of enterprise wechat; Allure reports, continuous integration of email notifications; Build scheduled tasks](/img/0f/f75603616bd54039f8ccfa3e024768.png)
[Jenkins' notes] introduction, free space; Continuous integration of enterprise wechat; Allure reports, continuous integration of email notifications; Build scheduled tasks

FLV文件简介

nep 2022 cat

Oozie job scheduling

Bracket matching test

C language 300 lines of code to achieve mine sweeping (deployable + markable + changeable difficulty level)

This article enables you to understand the underlying principle of MySQL- Internal structure, index, lock, cluster

时间复杂度、空间复杂度的学习总结
随机推荐
Third party login process of flask Weibo
vm options、program arguments、environment property
Day2: 130 questions in three languages
一篇万字博文带你入坑爬虫这条不归路 【万字图文】
全面升级,淘宝/天猫api接口大全
ACM SIGIR 2022 | interpretation of selected papers of meituan technical team
Rewriting method set
Y80. Chapter 4 Prometheus big factory monitoring system and practice -- Kube state metrics component introduction and monitoring extension (XI)
APP接入Kakaotalk三方登录
Flask project construction 2
File “manage.py“, line 14 ) from exc
C language 300 lines of code to achieve mine sweeping (deployable + markable + changeable difficulty level)
数字孪生轨道交通:“智慧化”监控疏通城市运行痛点
Dart array, map, type judgment, conditional judgment operator, type conversion
Flash reports an error: type object 'news' has no attribute' query 'the view name is duplicate with the model name
How to implement the time impact analysis of the construction project?
Digital currency of quantitative transactions - generate foot print factor data
Teach you a text to solve the problem of JS digital accuracy loss
【mysql】多指标历史累计去重问题
Django uses the existing data table method of MySQL database