Home > Backend Development > Python Tutorial > python 获取et和excel的版本号

python 获取et和excel的版本号

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-16 08:47:27
Original
1544 people have browsed it
复制代码 代码如下:

#-*- coding:utf-8 -*-
from win32com.client import Dispatch
if __name__ == '__main__':
app = Dispatch("et.Application")
# 小版本号
print 'app.Build:%s' % app.Build
# 大版本号
print 'app.Version:%s' % app.Version
app.Quit()

app = Dispatch("excel.Application")
# 小版本号
print 'app.Build:%s' % app.Build
# 大版本号
print 'app.Version:%s' % app.Version
app.Quit()

运行结果如下:
app.Build:6.4.0.1913
app.Version:6.0
app.Build:5612.0
app.Version:11.0
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template