python制作简单excel统计报表2之操作excel的模块openpyxl简单用法 # coding=utf-8 from openpyxl import Workbook, load_workbook from openpyxl.drawing.image import Image from openpyxl.styles import Font,colors from datetime import datetime import MySQLdb class ExcelUtils(obj
Sub fun1() '统计每一个sheet有多少行数据 Set s1 = Sheets("Sheet1") 'totalok = 0 To Sheets.Count s1.Cells(i, ) = Sheets(i).Name r = Sheets(i).Range("A65535").End(xlUp).Row s1.Cells(i, ) = r Then totalok = totalok + r End If Next s1.Cells(, ) = tota