excel-dbapi assumes a single writer per workbook path.
- Safe pattern: one process writes, many can read snapshots.
- Unsafe pattern: multiple concurrent writers to the same
.xlsxfile.
If multiple writers are required, coordinate with an external lock.
- Better workbook fidelity for most classroom/business spreadsheets.
- Good default for mixed read/write workloads.
- Loads with
data_only=True— formulas are evaluated to their cached values.
- Convenient for DataFrame-heavy flows.
- Rewrites the workbook and may drop rich formatting, formulas, and charts.
Saves are performed with a temp file followed by os.replace(...).
This provides atomic replacement on supported filesystems and avoids partial writes in normal failure scenarios.
autocommit=True(default): Changes are saved to disk after eachexecute().rollback()raisesNotSupportedError.autocommit=False: Changes are held in memory.commit()flushes to disk.rollback()restores the in-memory snapshot taken at connection open or lastcommit().
This is not ACID — there is no write-ahead log or crash recovery.