-
环境准备
python3
openpyxl -
代码
import openpyxl
wb = openpyxl.load_workbook(filedir)
sheet = wb.active
sheet.cell(row, col).font.color.rgb # 获取 表格内字体颜色
sheet.cell(row, col).fill.fgColor.rgb # 获取表格 填充色 颜色
- 注意事项
只能读取标准色
环境准备
python3
openpyxl
代码
import openpyxl
wb = openpyxl.load_workbook(filedir)
sheet = wb.active
sheet.cell(row, col).font.color.rgb # 获取 表格内字体颜色
sheet.cell(row, col).fill.fgColor.rgb # 获取表格 填充色 颜色