當前位置:編程學習大全網 - 電腦編程 - python2.4的openpyxl庫對excel格式的處理

python2.4的openpyxl庫對excel格式的處理

貌似 xlrd庫也是存在這個問題 只有自己給它塗色了

/codes/search/openpyxl.style.Color

example:

import openpyxl

from openpyxl.style import Color, Fill

from openpyxl.cell import get_column_letter

..

cell = sheet.cell(column=pt[0], row=pt[1])

cell.style.fill.fill_type = Fill.FILL_SOLID

cell.style.fill.start_color = Color(color)

cell.style.fill.end_color = Color(color)

  • 上一篇:LG的PLC K120S和 LG 的變頻器 SV022iG5-4怎麽建立RS485的通訊
  • 下一篇:小時候玩的壹個遊戲,是壹個小球可以移動的,還可以變大,還有水
  • copyright 2024編程學習大全網