'XLWings Unable to Load a Workbook on Remote Instance

XLwings works locally on my Windows machine, but if I try to run it remotely on a SageMaker instance (which I believe uses Linux under the hood) it doesn't work. What do I need to do to enable this?

Code is:

wb = xw.Book('my_excel_file.xlsx')

Which results in the following error:

XlwingsError: Your platform only supports the instantiation via xw.Book(json=...)

I'm planning on using XLwings to automatically run an excel model for me (update inputs, run model, save outputs) and I don't think this would be possible if converted to JSON - and I can't find anything in the docs to help me either. Appreciate the help!

Many thanks!



Solution 1:[1]

Hello brother I am not pro but I also have encountered this error, check sys.platform. mine is linux so it won't work https://docs.xlwings.org/en/stable/installation.html I am checking out this xlwings alternative on Linux

hopefully it will help you

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1