[python-win32] Help with com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Excel', u"Microsoft Excel cannot access the file

Tim Roberts timr at probo.com
Sun Dec 4 03:37:45 EST 2016


On Dec 2, 2016, at 1:56 PM, Doug Sharkey <douglas.sharkey at gmail.com> wrote:
> 
> Hi all,
> 
> This bit of code:
> 
>            objExcel = win32com.client.Dispatch("Excel.Application")
>             objExcel.visible = False        
>             objExcel.DisplayAlerts = False  
>             objWb=objExcel.Workbooks.Open(filename)
> 
> is producing this error:
> 
>  File "<COMObject <unknown>>", line 8, in Open
> com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Excel', u"Microsoft Excel cannot access the file '\\\\Win-rfe2cu0ucdn\\EFT_Share\\EFT_ToBeProcessed\\ABCD\\MyFile.P'.

What do you expect Excel to do with a file with the extension .P?
— 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list