Metadata-Version: 2.4
Name: openpyxl-enhanced
Version: 3.2.0b3
Summary: An openpyxl fork for Excel xlsx/xlsm files with formula-aware row/column edits and merged-cell formatting fixes
Home-page: https://github.com/EugeneRymarev/openpyxl-enhanced
Author: See AUTHORS
Maintainer: EugeneRymarev
License: MIT
Project-URL: Documentation, https://github.com/EugeneRymarev/openpyxl-enhanced#readme
Project-URL: Source, https://github.com/EugeneRymarev/openpyxl-enhanced
Project-URL: Tracker, https://github.com/EugeneRymarev/openpyxl-enhanced/issues
Project-URL: Upstream, https://foss.heptapod.net/openpyxl/openpyxl
Keywords: openpyxl,excel,xlsx,xlsm,spreadsheet,formulas,merged cells
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENCE.rst
Requires-Dist: et_xmlfile
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# openpyxl-enhanced

**openpyxl-enhanced** is an independent fork of
[openpyxl](https://foss.heptapod.net/openpyxl/openpyxl), a Python library for
reading and writing Excel `.xlsx`, `.xlsm`, `.xltx` and `.xltm` files.
It is based on the upstream 3.2 development line. This release is **3.2.0b3**
(beta), for Python **3.8 or newer**.

The distribution is named **openpyxl-enhanced**; the Python import remains **openpyxl**.
This fork is maintained separately from the original openpyxl project.

Previously published as `openpyxl2`. The distribution and GitHub repository
are now named `openpyxl-enhanced`; existing `openpyxl` imports stay the same.

## Installation

Use a fresh virtual environment:

```sh
python -m venv .venv
# Windows: .venv\Scripts\activate
# Linux/macOS: source .venv/bin/activate
python -m pip install openpyxl-enhanced==3.2.0b3
```

Do not install `openpyxl` and `openpyxl-enhanced` together: they provide the same
`openpyxl` module and can overwrite each other's files. `pip install openpyxl`
installs the original project. Dependencies that explicitly require the
`openpyxl` distribution are **not** satisfied by `openpyxl-enhanced`; check your
application's dependencies before switching.

If upgrading from the previous `openpyxl2` distribution, remove it before
installing this package, or create a fresh environment. Both distributions
provide the same `openpyxl` module:

```sh
python -m pip uninstall openpyxl2
python -m pip install openpyxl-enhanced==3.2.0b3
```

## What this fork changes

- Inserting and deleting rows or columns updates supported formula references,
  merged ranges, defined names, print areas and row/column dimensions.
- Partially deleted merged ranges retain the surviving anchor's value and style.
- Styles assigned after merging propagate through the merged range, with borders
  applied to its perimeter. Stored merged-cell styles survive save/load cycles.
- Additional fixes cover named styles, XML backends and workbook resource handling.

```python
from openpyxl import Workbook, load_workbook

workbook = Workbook()
sheet = workbook.active
sheet.append(["Item", "Units"])
sheet.append(["Pens", 10])
sheet.append(["Folders", 20])
sheet["B4"] = "=SUM(B2:B3)"
sheet.insert_rows(2)
assert sheet["B5"].value == "=SUM(B3:B4)"
workbook.save("sales.xlsx")

restored = load_workbook("sales.xlsx")
assert restored.active["B5"].value == "=SUM(B3:B4)"
restored.close()
```

## Scope and compatibility

Structural edits support direct A1 formula references, including absolute and
mixed references. They do not update every Excel feature: tables, charts, pivot
tables, validation, conditional formatting and external workbook references
require separate handling. Unsupported formula constructs can raise
`FormulaTranslationError` before an edit is applied. The library rewrites
formulas but does not calculate their results.

The fork removes the `openpyxl.open` alias; use `openpyxl.load_workbook`.
Named-style equality compares names. See the
[full feature list and limitations](https://github.com/EugeneRymarev/openpyxl-enhanced#readme)
and the [Russian README](https://github.com/EugeneRymarev/openpyxl-enhanced/blob/master/README.ru.md)
for details and examples.

`et_xmlfile` is a required dependency and is installed automatically. Optional
packages include `lxml` for XML processing, `Pillow` for images and `defusedxml`
for XML protection when handling untrusted files.

## Project and license

- [Source and examples](https://github.com/EugeneRymarev/openpyxl-enhanced)
- [Report a fork issue](https://github.com/EugeneRymarev/openpyxl-enhanced/issues)
- [Upstream API documentation](https://openpyxl.pages.heptapod.net/openpyxl/)
- [Original authors and contributors](https://github.com/EugeneRymarev/openpyxl-enhanced/blob/master/AUTHORS.rst)

Distributed under the MIT license. The original openpyxl copyright notice and
license are preserved in `LICENCE.rst` in the distribution.
