Skip to main content

officework

An xlsx engine that does not destroy your forms, plus a bridge that drives a running office app from Python — the way xlwings drives Excel, but on your own machine and without Excel.

Written in Rust (15,000+ lines, 240+ tests), exposed to Python through PyO3.

日本語は下にあります。

Two ways in

import office_sheet                      # the engine — no app needed
b = office_sheet.Book.open("form7.xlsx")
s = b["quote"]
s["A30"] = "Nihon Funen Co., Ltd."       # borders, merges, widths stay intact
s["C30"] = "=B30*100"                    # a formula; recalculated on the spot
s.insert_row(30)                         # remaining formulas follow the move
b.save("out.xlsx")                       # shapes and print setup carried over
from officework import calc as xw        # the bridge — drives the running app
import pandas as pd

wb = xw.Book()                           # a blank workbook comes up
wb.sheets.active["A1"].value = df        # the DataFrame lands in the sheet
df2 = wb.sheets.active["A1"].options(pd.DataFrame, expand="table").value

The bridge talks over a unix socket on this machine only — no TCP is opened. It needs officework running.

Why the engine exists

openpyxl rewrites the parts of the file it does not understand. For a spreadsheet used as a printed form — the way most Japanese offices use one — that means the borders, merged cells, column widths and shapes you spent an afternoon on come back wrong.

This engine keeps the original as the source of truth and writes back only what changed. b.unsupported lists anything it could not read, so nothing is dropped in silence.

Measured on one machine, 1096 rows × 20 columns (21,920 cells):

DataFrame → sheet 44 ms
sheet → DataFrame 65 ms

Install

pip install officework

Wheels are abi3 (Python 3.10+), so one wheel per platform covers every version. pandas is only imported when you ask for it (pip install officework[pandas]).

License

AGPL-3.0-or-later.

Using it inside your company — building forms, running ledgers, writing scripts — carries no obligations at all. Obligations appear only if you ship something built on it to third parties, or offer a modified version as a network service.


日本語

帳票を壊さない xlsx エンジンと、動いているオフィスソフトを Python から 操る橋です。xlwings の使い勝手を、Excel なしで、手元だけで。

openpyxl は理解できない部品を書き直すので、罫線・結合・列幅・図形が戻って きません。日本の事務の表計算は「印刷する様式」なので、そこが壊れると使えない。 このエンジンは原本を正として、変えた所だけ書き戻します。読めなかった物は b.unsupported に出るので、黙って落ちることはありません。

import office_sheet
b = office_sheet.Book.open("様式7.xlsx")
b["提案見積書"]["A30"] = "日本フネン株式会社"   # 書式は据え置き
b.save("out.xlsx")

ライセンスは AGPL-3.0-or-later。社内で使う分に義務はありません (帳票を作る・台帳を回す・スクリプトを書く・社内に配る、いずれも自由)。 義務が出るのは、これを組み込んだ物を社外へ配るときと、改造版をネットワーク 越しの役務として外部に提供するときだけです。

Release files for officework 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for officework 0.1.0
File Size Uploaded
officework-0.1.0.tar.gz 238.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for officework 0.1.0
File Interpreter ABI Platform
officework-0.1.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
officework-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
officework-0.1.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.10 abi3 macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64, macOS 10.12+ x86-64 Details

Total release size: 4.3 MB

Release files / officework-0.1.0.tar.gz

Download URL officework-0.1.0.tar.gz
Size 238.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8cef467c3b640c7fd3302b9cd44c6d252804b201acd8efe483f42941529cff9c
BLAKE2b-256 checksum
How to use checksums
efe2854a4f5fa370e4da794aceb24e060cc20c4ff8d3c07b7070f4837443d34f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.

Transparency log

Release files / officework-0.1.0-cp310-abi3-win_amd64.whl

Download URL officework-0.1.0-cp310-abi3-win_amd64.whl
Size 924.9 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
97420e9e8dd41908c5ebb2c25943e7877d030fbd766277455ff846e7a823e33a
BLAKE2b-256 checksum
How to use checksums
0d08921010c2d2ffb1c2c27c4005ca255b8c519ae5793d24f35f0947c48e5781
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.

Transparency log

Release files / officework-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL officework-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
58d83cf317b3663281c2ebffc2515a5cc1e9e9762481edc10a9d116fc59ce0f9
BLAKE2b-256 checksum
How to use checksums
e5175cccb5125ce11fe9c74cbb7508d7e5b476e1e89ca365cbcbfd03b886e037
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.

Transparency log

Release files / officework-0.1.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL officework-0.1.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 2.0 MB
Tags CPython 3.10 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0b7ab236ac5a72138efcf0567117998514dde0e5195d872670558b68792dd90c
BLAKE2b-256 checksum
How to use checksums
5da451533baeb9528016b5e5fb6212569da92f0c92e124bd0368b6926d255823
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page