![]() If this doesn’t work, xlwings checks if the local path is mapped by using the defaults and if the file can’t be found, it checks all existing local files on SharePoint. On Windows, xlwings first checks the registry for the mapping. SharePoint, unfortunately, allows you to map the drives locally in any way you want and there’s no way to reliably get the local path for these files. On macOS, you’ll need to provide it always anyway. On Windows, the root directory for SharePoint can sometimes be derived from the env vars, too, but this is not guaranteed. On macOS they don’t exist, which is the reason why you need to provide the root directory for OneDrive. You will need to know the root directory of the local drive though: on Windows, these are usually provided via environment variables for OneDrive. URLs for OneDrive and OneDrive for Business can be translated fairly straight forward to the local equivalent. If possible, make use of environment variables (as shown in the examples) so the configuration will work across different users with the same setup:Ī lot of the xlwings functionality depends on the workbook’s FullName property (via VBA/COM) that returns the local path of the file unless it is saved on OneDrive, OneDrive for Business or SharePoint with AutoSave enabled. If you get an error message, add the following setting with the correct path to the local root directory of your OneDrive. OneDrive (Personal) #ĭefault setups work out-of-the-box on Windows and macOS. ![]() If you are using the PRO version, you could instead also embed your code to get around these issues.įor a bit more flexibility, follow the solutions below. ![]() If, in turn, you are looking for the documentation to run xlwings with Excel on the web, see xlwings Server PRO.Īn easy workaround if you run into issues is to:ĭisable the ADD_WORKBOOK_TO_PYTHONPATH setting (either via the checkbox on the Ribbon or via the settings in the nf sheet).Īdd the directory of your Python source file to the PYTHONPATH-again, either via Ribbon or nf sheet. This means that both, the Excel and Python file, need to show the green check mark in the File Explorer/Finder as status-a cloud icon will not work. ![]() This documentation is for OneDrive and SharePoint files that are synced to a local folder. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |