/xlwings-server-helloworld-fastapi

Demo repo for the xlwings remote interpreter

Primary LanguageJavaScriptMIT LicenseMIT

xlwings Server: Hello World

This sample works with:

  • Excel on Windows
  • Excel on macOS
  • Excel on the web
  • Google Sheets

Quickstart

Development Server

  • Open this repo in GitPod:
    Open 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

Client

  • Desktop Excel (via VBA): Open the VBA editor via Ctrl-F11 (Windows) or Cmd-F11 (macOS) and replace the URL and auth argument in RunRemotePython with the respective values that GitPod prints.
  • Excel (via Office Scripts): In the Automate tab, click on New Script. Replace the content of the script with the content of js/xlwings_excel.ts. Save the script, then click on Run.
  • Google Sheets: Click on Extensions > Apps Scripts. Replace the code in the file Code.gs with the code in js/xlwings_google.js. Then hit the Run 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).

Next Steps: