1个回答
2015-08-05
展开全部
pip install pyexcel
读取文件以后,在重新写入文件就可以了。
import pyexcel as pe
import pyexcel.ext.xls # import it to handle xls file
import pyexcel.ext.xlsx # import it to handle xlsx file
records = pe.get_records(file_name="your_file.xls")
for record in records:
print("%s is aged at %d" % (record['Name'], record['Age']))
读取文件以后,在重新写入文件就可以了。
import pyexcel as pe
import pyexcel.ext.xls # import it to handle xls file
import pyexcel.ext.xlsx # import it to handle xlsx file
records = pe.get_records(file_name="your_file.xls")
for record in records:
print("%s is aged at %d" % (record['Name'], record['Age']))
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询