#!/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()
Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐