Editor

xlwings Lite uses the same editor as VS Code. This means that many of its familiar features are available.

AutoSave

When you’re writing Python code or editing the requirements.txt file, changes are automatically written to the workbook. The active tab shows this with a green checkmark. This makes sure that when you run a script or execute custom functions, you’re always using the latest version of the code as shown in the editor.

If you are storing the working on OneDrive/SharePoint with AutoSave enabled, everything is automatically and continuously saved to the workbook.

However, if you have AutoSave disabled, changes to the Python code and the requirement.txt file are only saved when you save the workbook.

Keyboard shortcuts

Many of the default VS Code keyboard shortcuts are available. A few examples:

Action

Windows/Linux

macOS

Move a line up or down

Alt + /

Alt + /

Delete an entire line

Shift + Ctrl + K

Shift + + K

Insert multi-cursor above/below

Alt + Ctrl + /

Alt + + /

Format code with Black

Shift + Alt + F

Shift + Alt + F

Run selected script

F5

F5

Increase/decrease editor font size

Ctrl + +/-

+ +/-

Code completion

Basic code completion is in place, however, it’s currently broken for NumPy. Also, complex packages such as pandas will take a few moments when you first trigger code completion until it’s ready.

Both issues will be addressed in a future release.

_images/autocompletions.png

Output Pane

The output pane at the bottom of the editor can be vertically resized:

_images/output_pane.png

Anything that you print() will show up in the output pane.