When attempting to use “excel.Workbooks.Open(filepath)” with pywin32 when the file paths are longer than 259 characters, I get an error saying that the path is too long. It works OK if the path is 254 characters.
With the Pandas library, for example, I've been able to get around the problem by prefixing the file paths with “\\?\”, but unable to do that with pywin32.
I've enabled the following local group policy setting https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd
and whilst it did make a difference to Pandas (since then I don't need to use the prefix “\\?\” at all), it's made no difference to pywin32.
Any ideas of how I can get around this (apart from reducing the file path lengths).