[python-win32] pywin can not access excel file
Tim Roberts
timr at probo.com
Mon Dec 13 00:37:08 EST 2021
On 12/12/21 12:32 AM, Tamara Abugharbieh wrote:
> We are using winpy32 to automate excel applications using python. The
> python script will be used by users with no administrator privileges,
> and in this case, we are getting the following error:
>
> pywintypes.com_error: (-2147352567, 'Exception occurred.', (0,
> 'Microsoft Excel', \"Microsoft Excel cannot access the file
> 'C:\\\\App\\\\Backend\\\\public\\\\MSB_2021\\\\11\\\\SYB_10_7_V1.xlsx'.
> There are several possible reasons: The file name or path does not
> exist. The file is being used by another program. The workbook you are
> trying to save has the same name as a currently open workbook.\",
> 'xlmain11.chm', 0, -2146827284)
>
Have you checked the permissions (with Explorer or with icacls) to see
if the files are readable by "All Users"? Can one of those users open
the file from Excel, without using your script?
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/python-win32/attachments/20211212/510a0e03/attachment-0001.html>
More information about the python-win32
mailing list