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
Post a Comment