摘要: 准备数据: 求和代码: import openpyxlwb = openpyxl.load_workbook('C:/Users/Administrator/Desktop/1.xlsx')ws = wb['test']min_row = ws.min_rowmax_row = ws.max_row 阅读全文
posted @ 2023-07-25 16:05 往事已成昨天 阅读(716) 评论(0) 推荐(1) 编辑
摘要: 准备好数据: import numpy as npimport openpyxl def Read_Excel(Excelname,sheet): ''' 作用:读取excel表格 load_workbook 模块读取 excel 文件中对应的"修改"表中的数据,封装为列表并返回 ''' excel 阅读全文
posted @ 2023-07-25 14:56 往事已成昨天 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 图表代码如下:#!/usr/bin/env pythonfrom openpyxl import Workbookfrom openpyxl.chart import ( Reference, Series, BarChart)book = Workbook()sheet = book.active 阅读全文
posted @ 2023-07-25 10:55 往事已成昨天 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 求和代码:#!/usr/bin/env pythonfrom openpyxl import Workbookbook = Workbook()sheet = book.activerows = ( (34, 26), (88, 36), (24, 29), (15, 22), (56, 13), 阅读全文
posted @ 2023-07-25 10:49 往事已成昨天 阅读(14) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env pythonfrom openpyxl import Workbookfrom openpyxl.styles import Alignmentbook = Workbook()sheet = book.activesheet.merge_cells('A1:B2')c 阅读全文
posted @ 2023-07-25 10:14 往事已成昨天 阅读(50) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env pythonfrom openpyxl import Workbookbook = Workbook()sheet = book.activesheet['A3'] = 39sheet['B3'] = 19rows = [ (88, 46), (89, 38), (23 阅读全文
posted @ 2023-07-25 09:33 往事已成昨天 阅读(20) 评论(0) 推荐(0) 编辑