简体   繁体   English

使用python保存打开的Excel文件

[英]Save open excel file using python

How do I save an open excel file using python= I currently read the excel workbook using XLRD but I need to save the excel file so any changes the user inputs are read. 我如何使用python =保存打开的excel文件,我目前使用XLRD读取excel工作簿,但是我需要保存excel文件,以便读取用户输入的所有更改。

I have done this using a VBA script from within excel which saves the workbook every x seconds, but this is not ideal. 我已经使用excel中的VBA脚本完成了此操作,该脚本每x秒保存一次工作簿,但这并不理想。

It looks like XLRD is used for reading the data, not interfacing with excel. 看起来XLRD用于读取数据,而不是与excel接口。 So no, unless you use a different library using python is not the best way to do this, what is wrong with the VBA script? 所以不,除非您使用使用Python的其他库不是实现此目的的最佳方法,否则VBA脚本有什么问题?

How about using xlwt? 如何使用xlwt?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM