import win32com.client as win32
from pathlib import Path
out_file = Path.cwd() / "sample.xlsx"
excel = win32.gencache.EnsureDispatch('Excel.Application')
excel.Visible = True
# Open up the file
excel.Workbooks.Open(out_file)
python 调用office 软件 excel 打开xlsx文件
最新推荐文章于 2025-01-09 18:22:49 发布