程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Use Python to copy excel, add data, and color cells

編輯:Python
 There's a need recently : Need to generate a excel, And on this basis , In the daily excel Add data to , It is also required that daily data changes be marked with background color , The naked eye is intuitive .
Receive this demand , My first thought was , Use a line chart to complete . But considering that , Thousands of indicators , The line chart will only be dense , Poor visibility .
So think about it , Or use it excel To achieve . Although the data will be more and more , It's going to get slower and slower , But it can't stop the intuition of data . It can be seen at a glance through screening .
The current version just copies the previous data to the new excel, Then color according to the size of the data . In the follow-up, we will also count the data that has become smaller for seven consecutive days , By email , Notify the corresponding administrator by SMS login .
I don't say much nonsense , Code up
# _*_coding:utf-8 _*_
# author:hx 
import xlrd,xlwt
def get_cell_bg_color( wb, sheet, row_index, col_index)

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved