Python gets the version Numbers for et and excel

  • 2020-04-02 09:23:08
  • OfStack


#-*- coding:utf-8 -*- 
from win32com.client import Dispatch 
if __name__ == '__main__': 
app = Dispatch("et.Application") 
#  Small version number  
print 'app.Build:%s' % app.Build 
#  The version number  
print 'app.Version:%s' % app.Version 
app.Quit() 

app = Dispatch("excel.Application") 
#  Small version number  
print 'app.Build:%s' % app.Build 
#  The version number  
print 'app.Version:%s' % app.Version 
app.Quit()

The operation results are as follows:
App. Build: 6.4.0.1913
App. Version: 6.0
App. Build: 5612.0
App. Version: 11.0

Related articles: