简体   繁体   中英

How do I open Excel Application using xlrd or xlwt?

我知道我可以通过将Visible设置为true来使用win32com打开MS Excel应用程序。我可以使用xlrd或xlwt这样做吗?

xlrd and xlwt are both libraries for reading Excel's files (that is, the storage format) - they have no connection to the actual Excel executable or libraries (they don't even require that Excel is installable on the system in question (I'm using them, for example on a CentOS machine).

If you simply want to lauch Excel you can use subprocess :

# Note, your path probably differs
subprocess.call(r"C:\Program Files\Microsoft Office\Office12\EXCEL.exe")

# The script will wait until Excel is closed and then continue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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