[xlwings模块学习]让Excel飞一下,使用xlwings模块,生成多个Excel表
程序员文章站
2024-02-23 19:27:46
...
#!/usr/bin/python
# -*- coding: utf-8 -*-
import xlwings as xw
# 使用xlwings模块,生成多个Excel表
# 让Excel飞一下.py
if __name__ == '__main__':
app = xw.App(visible=True, add_book=False)
for i in range(1, 5):
workbook = app.books.add()
workbook.save("Excel表_"+str(i)+".xlsx")
workbook.close()
app.quit()