This sample works with:
- Excel on Windows
- Excel on macOS
- Excel on the web
- Google Sheets
- Open this repo in GitPod:
- When you open it the very first time, it will ask you to enter an xlwings (trial) license key. You can get one from here: https://www.xlwings.org/trial
- Desktop Excel (via VBA): Open the VBA editor via
Ctrl-F11
(Windows) orCmd-F11
(macOS) and replace the URL andauth
argument inRunRemotePython
with the respective values that GitPod prints. - Excel (via Office Scripts): In the
Automate
tab, click onNew Script
. Replace the content of the script with the content ofjs/xlwings_excel.ts
.Save
the script, then click onRun
. - Google Sheets: Click on
Extensions
>Apps Scripts
. Replace the code in the fileCode.gs
with the code injs/xlwings_google.js
. Then hit theRun
button. If you run this the very first time, Google Sheets will ask you for the permissions it needs.
To learn about how to call your script from a button with Google Sheets or Excel on the web, have a look at the docs (link below).
-
Docs:
https://docs.xlwings.org/en/stable/remote_interpreter.html -
Authentication:
https://docs.xlwings.org/en/stable/server_authentication.html -
Docker:
A Docker image can be built for local development or can serve as a basis for production deployment:First, build the Docker image:
docker build -t xlwings .
Then run the server locally like this:
docker run --rm -p 8000:8000 -e XLWINGS_LICENSE_KEY=your-license-key -e APP_API_KEY=a_random_key xlwings