当前位置:网站首页>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

边栏推荐
- Prometheus 的 API 稳定性保障
- 嵌入式分享合集23
- Flask reports an error: pymysq1.err OperationalError:(1054, “Unknown column ‘None‘ in ‘field list‘“)
- Letax record \documentclass{}, authoryear attribute is used
- Recursion and divide and conquer
- Groundwater, soil, geology and environment
- [leetcode sliding window problem]
- [SQL's 18 dragon subduing palms] 01 - Kang long regrets: introductory 10 questions
- Main causes of IT hardware failures and best practices for prevention
- 了解网址url的组成后 运用url模块、querystring模块和mime模块完善静态网站
猜你喜欢

表达式求值

测试/开发程序员靠技术渡过中年危机?提升自己本身的价值......

教你一文解决 js 数字精度丢失问题

北京护照西班牙语翻译推荐

Self-attention neural architecture search for semantic image segmentation

How to implement the time impact analysis of the construction project?

SQL question brushing: find the employee number EMP with more than 15 salary records_ No and its corresponding recording times t

Day2: 130 questions in three languages

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

SQL injection of DVWA
随机推荐
PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
[ManageEngine] help Harbin Engineering University realize integrated monitoring and management of network traffic
北京护照西班牙语翻译推荐
Dart array, map, type judgment, conditional judgment operator, type conversion
Digital currency of quantitative transactions - generate foot print factor data
Instruction rearrangement, happens before, as if serial
Learning summary of time complexity and space complexity
Three ways of creating indexes in MySQL
DVWA之SQL注入
A ten thousand word blog post takes you into the pit. Reptiles are a dead end [ten thousand word pictures]
nep 2022 cat
Third party login process of flask Weibo
Google Play APK 上传其他国际应用商店
Seven SQL performance optimizations that spark 3.0 must know
Error installing mysqlclient module on MAC system
表达式求值
vm options、program arguments、environment property
C language bracket matching (stack bracket matching C language)
Canal实时解析mysql binlog数据实战
【mysql】多指标历史累计去重问题