版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/TheLittlePython/article/details/78894319
存在每次活动整理的Excel数据文件,需放在一个Excel上进行保存
#-*-coding:utf-8-*- import os import pandas as pd path='' files=os.listdir(path) newexcel=pd.ExcelWriter('bb.xlsx') for i in files: pd.read_excel(path+'/'+'%s'%i,sheetname='').to_excel(newexcel,sheet_name=unicode(files.index(i))) newexcel.save
修改Excel格式,使用Ctrl或Shift选取所有工作簿中所有表,然后只要对一个表进行修改即可令所有sheet具有同一格式
后续会使用Python代码来代替