## TL;DR

For "ImportError: cannot import name 'save_virtual_workbook' from 'openpyxl.writer.excel'": the save_virtual_workbook helper was removed in openpyxl 3.1, and the Rossum CLI code still imported it, so any install with openpyxl &gt;= 3.1 crashed on the export path. Pin openpyxl to a version that still has save_virtual_workbook: pip install openpyxl==3.0.10.

```text
ImportError: cannot import name 'save_virtual_workbook' from 'openpyxl.writer.excel'
```

## Steps

1. Running the Rossum CLI failed with "ImportError: cannot import name 'save_virtual_workbook' from 'openpyxl.writer.excel'". The save_virtual_workbook helper was removed in openpyxl 3.1, and the Rossum CLI code still imported it, so any install with openpyxl &gt;= 3.1 crashed on the export path. The reporter confirmed the error disappeared after downgrading, and a second user confirmed the same workaround.

2. Pin openpyxl to a version that still has save_virtual_workbook: pip install openpyxl==3.0.10. The reporter confirmed the error disappeared after downgrading, and a second user confirmed the same fix for XLS exports. Longer term, the Rossum CLI needs to stop importing the removed helper (a code upgrade for openpyxl 3.1+). Source: https://github.com/rossumai/rossum/issues/42

## When to use

You are seeing this: Running the Rossum CLI failed with "ImportError: cannot import name 'save_virtual_workbook' from 'openpyxl.writer.excel'". Use this skill when you run into "Rossum CLI ImportError: cannot import name 'save_virtual_workbook' from openpyxl".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

Versions mentioned in the source: openpyxl 3.0.10. If you are on something much newer or older, the details may have shifted.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

## Sources

- https://github.com/rossumai/rossum/issues/42
