python - Excel 2016 opens differently from PyWin32 than normal opening -


i opening excel 2016 python using pywin32 package using following code

import win32com.client win32 win32com.client import dispatch  def openworkbook(filepath):     excelobj = win32.gencache.ensuredispatch("excel.application")     excelobj.displayalerts = false     excelobj.visible = true     wbkobj = excelobj.workbooks.open(filename=filepath)     return(excelobj, wbkobj) 

when open workbooks in way, number of add-ins rely upon not initialized, though initialize when open excel in typical fashion.

while understand can initialize them manually via filepaths, prefer open excel in such way of add-ins typically initialize included.

thank you.


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -