sheetcraft


Namesheetcraft JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
SummaryFlexible, intuitive Excel processing library for .xlsx and .xls
upload_time2025-10-20 08:47:34
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseApache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [2025] [GetAIx contributors] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords excel xlsx xls openpyxl xlsxwriter xlwt template data validation images
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # sheetcraft

一个灵活、直观的 Python Excel 处理库。

- 支持 `.xlsx`(默认使用 openpyxl;可选 xlsxwriter 提升写入性能)
- 支持旧版 `.xls`(通过 xlwt,图片自动使用 BMP 回退)
- 高级导出能力:可定制单元格样式与格式
- 模板渲染(Jinja2),支持变量与块重复
- 图片插入(PNG/JPG;`.xls` 自动转 BMP)
- 数据有效性(Data Validation)辅助 API
- 公式书写与可选评估(xlcalculator)
- 多工作表操作
- 面向大数据集的性能优化

## Installation

> 环境要求:Python >= 3.11

```bash
# 默认推荐:安装全部组件
pip install 'sheetcraft[all]'

# 或仅安装核心(不含可选组件)
pip install sheetcraft

# 分组件安装(可选):
pip install 'sheetcraft[images]'      # 图片支持(Pillow)
pip install 'sheetcraft[xls]'         # 旧版 `.xls` 支持(xlwt/xlrd)
pip install 'sheetcraft[fast]'        # 更快的 `.xlsx` 写入(xlsxwriter)
pip install 'sheetcraft[template]'    # 模板渲染支持(Jinja2)
pip install 'sheetcraft[formula]'     # 公式评估(xlcalculator)
```

## Quick Start

```python
from sheetcraft import ExcelWorkbook

# Create a fast .xlsx export using xlsxwriter
wb = ExcelWorkbook(output_path='out.xlsx', fast=True)
ws = wb.add_sheet('Report')

# Write header with style
header_style = {
    'font': {'bold': True, 'size': 12},
    'fill': {'color': '#DDEEFF'},
    'align': {'horizontal': 'center'},
    'border': {'left': True, 'right': True, 'top': True, 'bottom': True}
}
wb.write_row(ws, 1, ['Item', 'Qty', 'Price', 'Total'], styles=[header_style]*4)

# Write data rows
rows = [
    ['Widget A', 5, 19.99, '=B2*C2'],
    ['Widget B', 2, 29.50, '=B3*C3'],
]
wb.write_rows(ws, start_row=2, rows=rows)

# Data validation for Qty column (whole number, >= 0)
from sheetcraft.workbook import DataValidationSpec
wb.add_data_validation(ws, 'B2:B100', DataValidationSpec(type='whole', operator='>=', formula1='0'))

# Insert an image
wb.insert_image(ws, 1, 6, 'logo.png', scale_x=0.5, scale_y=0.5)

# Set column widths
wb.set_column_width(ws, 1, 18)
wb.set_column_width(ws, 2, 10)
wb.set_column_width(ws, 3, 12)
wb.set_column_width(ws, 4, 12)

# Save
wb.save()
```

## Template Rendering (.xlsx)

Use Jinja2 placeholders in cell values and native `{% for %}` loops for repetition.

- `{{ title }}` replaces with `data['title']`
- `{% for item in items %}` ... `{% endfor %}` renders rows within the block capacity using `{{ item.field }}`.
  - Single-line form: place `{% for %}` on the row with templates and `{% endfor %}` on a later row; only the first item is rendered.
  - Multi-line block: put multiple template rows between `{% for %}` and `{% endfor %}`; capacity equals the number of template rows.

```python
from sheetcraft import ExcelTemplate, ExcelWorkbook

# Build a simple template that uses Jinja2 for (capacity=2)
wb = ExcelWorkbook(output_path='template.xlsx')
ws = wb.get_sheet()
wb.write_cell(ws, 1, 1, '{{ title }}')
wb.write_cell(ws, 3, 1, '{% for item in items %}')
wb.write_row(ws, 4, ['{{ item.name }}', '{{ item.qty }}', '{{ item.price }}', '=B4*C4'])
wb.write_row(ws, 5, ['{{ item.name }}', '{{ item.qty }}', '{{ item.price }}', '=B5*C5'])
wb.write_cell(ws, 6, 1, '{% endfor %}')
wb.save()

renderer = ExcelTemplate()
renderer.render('template.xlsx', {
    'title': 'Sales Report',
    'items': [
        {'name': 'Widget A', 'qty': 5, 'price': 19.99},
        {'name': 'Widget B', 'qty': 2, 'price': 29.50},
    ]
}, 'rendered.xlsx')
```

> 注意:旧版 `[[repeat ...]]` 语法已移除。请在模板中使用标准的 Jinja2 `{% for %}` 块。

## 格式修复模块(可选开关)

当生成的 `.xlsx` 在某些前端/预览组件中表现异常(如绘图锚点命名空间缺失),可以启用“格式修复”进行无损结构修补。

- 核心能力:`FormatFixConfig`(配置)、`FixReport`(结果报告)、`fix_xlsx(path, config)`(对文件进行修补)
- 目前内置规则:`prefix_drawing_anchors=True`,为绘图锚点标签增加 `xdr:` 前缀,并在根 `wsDr` 上补充 `xmlns:xdr` 命名空间。

启用方式:

- 在 `ExcelWorkbook` 层:
  - `apply_format_fix_on_save=True` 仅对 `.xlsx` 在 `save()` 后进行修补;`preview_temp()` 也会应用;`get_bytes()` 不做修改。
  - `format_fix_config=FormatFixConfig(...)` 配置具体规则。

```python
from sheetcraft import ExcelWorkbook, FormatFixConfig

wb = ExcelWorkbook(
    output_path='out.xlsx',
    fast=True,
    apply_format_fix_on_save=True,
    format_fix_config=FormatFixConfig(prefix_drawing_anchors=True)
)
ws = wb.add_sheet('Report')
# ... 写入数据 ...
wb.save()  # 保存后自动进行格式修复(仅 .xlsx)
```

- 在 `ExcelTemplate` 渲染层:
  - `apply_format_fix=True` 在渲染保存后对 `.xlsx` 进行修补。
  - `format_fix_config=FormatFixConfig(...)` 配置具体规则。

```python
from sheetcraft import ExcelTemplate, FormatFixConfig

renderer = ExcelTemplate(
    apply_format_fix=True,
    format_fix_config=FormatFixConfig(prefix_drawing_anchors=True)
)
renderer.render('template.xlsx', data, 'rendered.xlsx')
```

说明:修复过程只调整结构与命名空间,不改变单元格数据。若修复失败不会中断主流程(会记录报告或抛出详细异常用于排查)。

## Styles and Formatting

A simple style dict can include:

- `font`: `name`, `size`, `bold`, `italic`, `underline`, `color`
- `align`: `horizontal` (`left|center|right`), `vertical` (`top|center|bottom`), `wrap`
- `fill`: `color` (e.g., `#FFEECC`)
- `border`: `left|right|top|bottom` flags and optional `color`
- `number_format`: Excel number format string (e.g., `"#,##0.00"`, `"yyyy-mm-dd"`)

```python
price_style = {'number_format': '#,##0.00'}
wb.write_cell(ws, 2, 3, 19.99, price_style)
```

## Data Validation

```python
# Allow only values from a list
wb.add_data_validation(ws, 'E2:E100', DataValidationSpec(type='list', formula1='"Small,Medium,Large"'))

# Date between two bounds
wb.add_data_validation(ws, 'F2:F100', DataValidationSpec(type='date', operator='between', formula1='DATE(2024,1,1)', formula2='DATE(2024,12,31)'))
```

Note: `.xls` (xlwt) does not support data validation creation.

## Formula Support

Write formulas with `set_formula` or pass strings starting with `=` in `write_cell`.

Optional evaluation using xlcalculator:

```python
from sheetcraft.formulas import evaluate_xlsx_formulas
results = evaluate_xlsx_formulas('out.xlsx')
for (sheet, cell), value in results.items():
    print(sheet, cell, value)
```

## Multi-Sheet Operations

```python
wb = ExcelWorkbook(output_path='multi.xlsx', fast=False)
ws1 = wb.add_sheet('Summary')
ws2 = wb.add_sheet('Data')
wb.write_cell(ws1, 1, 1, 'Overview')
wb.write_rows(ws2, 1, [[1,2,3],[4,5,6],[7,8,9]])
wb.save()
```

## Legacy .xls Support

```python
wb = ExcelWorkbook(output_path='legacy.xls', file_format='xls')
ws = wb.add_sheet('Sheet1')
wb.write_rows(ws, 1, [["A", 1], ["B", 2]])
wb.insert_image(ws, 1, 3, 'logo.jpg')  # converted to BMP automatically
wb.save()
```

Constraints: `.xls` has limited styling, image, and no data validation creation.

## Performance for Large Datasets

- Use `fast=True` to write with xlsxwriter for very large `.xlsx` exports.
- For openpyxl, set `write_only=True` to stream rows efficiently.

```python
wb = ExcelWorkbook(output_path='big.xlsx', fast=True)
ws = wb.add_sheet('Data')
for i in range(2, 100_002):
    wb.write_row(ws, i, [f'Item {i}', i, i * 1.23])
wb.save()
```

## 技术实现细节概览

- 引擎选择:
  - `.xlsx` 默认使用 `openpyxl`;`fast=True` 时使用 `xlsxwriter`(更快写入,部分功能有限制)。
  - `.xls` 使用 `xlwt`(样式支持有限、无数据验证创建能力)。
  - `write_only=True` 可在 `openpyxl` 下流式写入以降低内存。
- 核心抽象:
  - `ExcelWorkbook` 提供工作表管理(`add_sheet/get_sheet`)、单元格与行写入(`write_cell/row/rows`)、行列尺寸、合并单元格、图片插入、数据验证等。
  - 样式通过统一字典进行描述,内部映射到不同引擎:`styles.py` 中的颜色规范化(`_normalize_color`)、`xlsxwriter_format_from_dict` 与 `xlwt_style_from_dict` 等。
- 模板渲染:
  - `ExcelTemplate.render` 基于 Jinja2,将单元格中的占位符与 `{% for %}` 块解析并渲染;多行块容量=模板行数,兼容常见导出场景。
- 格式修复:
  - `format_fix.py` 与生成流程解耦,仅在保存后对 `.xlsx` 进行结构性修补(如补全绘图锚点命名空间),保证数据不变。
- 公式评估:
  - `formulas.py` 提供 `evaluate_xlsx_formulas`,可选依赖 `xlcalculator` 进行公式计算并返回结果字典。
- 预览与字节:
  - `ExcelWorkbook.preview_temp()` 生成临时文件用于前端预览(若启用修复则也应用);`get_bytes()` 直接返回内存字节,不做修复。
- 日志与错误:
  - 关键路径使用 `logging` 记录修复与渲染报告;异常均尽量包含上下文,便于定位问题。

## Project Structure

```
sheetcraft/
  __init__.py
  workbook.py
  styles.py
  images.py
  validation.py
  template.py
  formulas.py
examples/
  export_basic.py
  template_render.py
  image_insert.py
  multi_sheet.py
pyproject.toml
README.md
```

## 致谢

本项目感谢以下开源项目及其作者与维护者(致谢详情见 `NOTICE`):
- openpyxl、XlsxWriter、xlwt、xlrd、Jinja2、Pillow、xlcalculator
- 开发工具:pytest、pytest-cov、pytest-benchmark

## 兼容性与限制

- `.xlsx`:
  - `openpyxl` 功能更完整;适合多数样式与数据验证场景。
  - `xlsxwriter` 在 `fast=True` 时用于更快写入,部分高级样式/特性可能有限制;建议大数据量导出使用。
- `.xls`:
  - 样式能力有限、图片需 BMP 回退、不可创建数据验证;适合兼容旧系统的基础导出。
- 模板渲染:
  - 支持单元格占位符与 `{% for %}` 重复块;多行块的容量=模板行数。
  - 不支持跨工作表复杂引用的自动展开;如需更复杂逻辑建议用 Python 预处理数据。
- 公式评估:
  - 依赖 `xlcalculator`,仅对 `.xlsx` 提供可选评估;某些 Excel 特性(如外部引用、宏)不在支持范围内。
- 格式修复模块:
  - 仅对 `.xlsx` 在保存后进行结构修补;不改变单元格数据。
  - 当前主要适用绘图锚点命名空间修补;后续可按需扩展更多规则。

## License

Apache License 2.0。详见 `LICENSE`。

Repository: https://github.com/getaix/sheetcraft.git

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sheetcraft",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "excel, xlsx, xls, openpyxl, xlsxwriter, xlwt, template, data validation, images",
    "author": null,
    "author_email": "getaix <dev@getaix.tech>",
    "download_url": "https://files.pythonhosted.org/packages/22/9d/1e51000bf82a3f89cfc2f6df96a44474ff53f71ca7a2a6028ed47fd5117e/sheetcraft-0.2.1.tar.gz",
    "platform": null,
    "description": "# sheetcraft\n\n\u4e00\u4e2a\u7075\u6d3b\u3001\u76f4\u89c2\u7684 Python Excel \u5904\u7406\u5e93\u3002\n\n- \u652f\u6301 `.xlsx`\uff08\u9ed8\u8ba4\u4f7f\u7528 openpyxl\uff1b\u53ef\u9009 xlsxwriter \u63d0\u5347\u5199\u5165\u6027\u80fd\uff09\n- \u652f\u6301\u65e7\u7248 `.xls`\uff08\u901a\u8fc7 xlwt\uff0c\u56fe\u7247\u81ea\u52a8\u4f7f\u7528 BMP \u56de\u9000\uff09\n- \u9ad8\u7ea7\u5bfc\u51fa\u80fd\u529b\uff1a\u53ef\u5b9a\u5236\u5355\u5143\u683c\u6837\u5f0f\u4e0e\u683c\u5f0f\n- \u6a21\u677f\u6e32\u67d3\uff08Jinja2\uff09\uff0c\u652f\u6301\u53d8\u91cf\u4e0e\u5757\u91cd\u590d\n- \u56fe\u7247\u63d2\u5165\uff08PNG/JPG\uff1b`.xls` \u81ea\u52a8\u8f6c BMP\uff09\n- \u6570\u636e\u6709\u6548\u6027\uff08Data Validation\uff09\u8f85\u52a9 API\n- \u516c\u5f0f\u4e66\u5199\u4e0e\u53ef\u9009\u8bc4\u4f30\uff08xlcalculator\uff09\n- \u591a\u5de5\u4f5c\u8868\u64cd\u4f5c\n- \u9762\u5411\u5927\u6570\u636e\u96c6\u7684\u6027\u80fd\u4f18\u5316\n\n## Installation\n\n> \u73af\u5883\u8981\u6c42\uff1aPython >= 3.11\n\n```bash\n# \u9ed8\u8ba4\u63a8\u8350\uff1a\u5b89\u88c5\u5168\u90e8\u7ec4\u4ef6\npip install 'sheetcraft[all]'\n\n# \u6216\u4ec5\u5b89\u88c5\u6838\u5fc3\uff08\u4e0d\u542b\u53ef\u9009\u7ec4\u4ef6\uff09\npip install sheetcraft\n\n# \u5206\u7ec4\u4ef6\u5b89\u88c5\uff08\u53ef\u9009\uff09\uff1a\npip install 'sheetcraft[images]'      # \u56fe\u7247\u652f\u6301\uff08Pillow\uff09\npip install 'sheetcraft[xls]'         # \u65e7\u7248 `.xls` \u652f\u6301\uff08xlwt/xlrd\uff09\npip install 'sheetcraft[fast]'        # \u66f4\u5feb\u7684 `.xlsx` \u5199\u5165\uff08xlsxwriter\uff09\npip install 'sheetcraft[template]'    # \u6a21\u677f\u6e32\u67d3\u652f\u6301\uff08Jinja2\uff09\npip install 'sheetcraft[formula]'     # \u516c\u5f0f\u8bc4\u4f30\uff08xlcalculator\uff09\n```\n\n## Quick Start\n\n```python\nfrom sheetcraft import ExcelWorkbook\n\n# Create a fast .xlsx export using xlsxwriter\nwb = ExcelWorkbook(output_path='out.xlsx', fast=True)\nws = wb.add_sheet('Report')\n\n# Write header with style\nheader_style = {\n    'font': {'bold': True, 'size': 12},\n    'fill': {'color': '#DDEEFF'},\n    'align': {'horizontal': 'center'},\n    'border': {'left': True, 'right': True, 'top': True, 'bottom': True}\n}\nwb.write_row(ws, 1, ['Item', 'Qty', 'Price', 'Total'], styles=[header_style]*4)\n\n# Write data rows\nrows = [\n    ['Widget A', 5, 19.99, '=B2*C2'],\n    ['Widget B', 2, 29.50, '=B3*C3'],\n]\nwb.write_rows(ws, start_row=2, rows=rows)\n\n# Data validation for Qty column (whole number, >= 0)\nfrom sheetcraft.workbook import DataValidationSpec\nwb.add_data_validation(ws, 'B2:B100', DataValidationSpec(type='whole', operator='>=', formula1='0'))\n\n# Insert an image\nwb.insert_image(ws, 1, 6, 'logo.png', scale_x=0.5, scale_y=0.5)\n\n# Set column widths\nwb.set_column_width(ws, 1, 18)\nwb.set_column_width(ws, 2, 10)\nwb.set_column_width(ws, 3, 12)\nwb.set_column_width(ws, 4, 12)\n\n# Save\nwb.save()\n```\n\n## Template Rendering (.xlsx)\n\nUse Jinja2 placeholders in cell values and native `{% for %}` loops for repetition.\n\n- `{{ title }}` replaces with `data['title']`\n- `{% for item in items %}` ... `{% endfor %}` renders rows within the block capacity using `{{ item.field }}`.\n  - Single-line form: place `{% for %}` on the row with templates and `{% endfor %}` on a later row; only the first item is rendered.\n  - Multi-line block: put multiple template rows between `{% for %}` and `{% endfor %}`; capacity equals the number of template rows.\n\n```python\nfrom sheetcraft import ExcelTemplate, ExcelWorkbook\n\n# Build a simple template that uses Jinja2 for (capacity=2)\nwb = ExcelWorkbook(output_path='template.xlsx')\nws = wb.get_sheet()\nwb.write_cell(ws, 1, 1, '{{ title }}')\nwb.write_cell(ws, 3, 1, '{% for item in items %}')\nwb.write_row(ws, 4, ['{{ item.name }}', '{{ item.qty }}', '{{ item.price }}', '=B4*C4'])\nwb.write_row(ws, 5, ['{{ item.name }}', '{{ item.qty }}', '{{ item.price }}', '=B5*C5'])\nwb.write_cell(ws, 6, 1, '{% endfor %}')\nwb.save()\n\nrenderer = ExcelTemplate()\nrenderer.render('template.xlsx', {\n    'title': 'Sales Report',\n    'items': [\n        {'name': 'Widget A', 'qty': 5, 'price': 19.99},\n        {'name': 'Widget B', 'qty': 2, 'price': 29.50},\n    ]\n}, 'rendered.xlsx')\n```\n\n> \u6ce8\u610f\uff1a\u65e7\u7248 `[[repeat ...]]` \u8bed\u6cd5\u5df2\u79fb\u9664\u3002\u8bf7\u5728\u6a21\u677f\u4e2d\u4f7f\u7528\u6807\u51c6\u7684 Jinja2 `{% for %}` \u5757\u3002\n\n## \u683c\u5f0f\u4fee\u590d\u6a21\u5757\uff08\u53ef\u9009\u5f00\u5173\uff09\n\n\u5f53\u751f\u6210\u7684 `.xlsx` \u5728\u67d0\u4e9b\u524d\u7aef/\u9884\u89c8\u7ec4\u4ef6\u4e2d\u8868\u73b0\u5f02\u5e38\uff08\u5982\u7ed8\u56fe\u951a\u70b9\u547d\u540d\u7a7a\u95f4\u7f3a\u5931\uff09\uff0c\u53ef\u4ee5\u542f\u7528\u201c\u683c\u5f0f\u4fee\u590d\u201d\u8fdb\u884c\u65e0\u635f\u7ed3\u6784\u4fee\u8865\u3002\n\n- \u6838\u5fc3\u80fd\u529b\uff1a`FormatFixConfig`\uff08\u914d\u7f6e\uff09\u3001`FixReport`\uff08\u7ed3\u679c\u62a5\u544a\uff09\u3001`fix_xlsx(path, config)`\uff08\u5bf9\u6587\u4ef6\u8fdb\u884c\u4fee\u8865\uff09\n- \u76ee\u524d\u5185\u7f6e\u89c4\u5219\uff1a`prefix_drawing_anchors=True`\uff0c\u4e3a\u7ed8\u56fe\u951a\u70b9\u6807\u7b7e\u589e\u52a0 `xdr:` \u524d\u7f00\uff0c\u5e76\u5728\u6839 `wsDr` \u4e0a\u8865\u5145 `xmlns:xdr` \u547d\u540d\u7a7a\u95f4\u3002\n\n\u542f\u7528\u65b9\u5f0f\uff1a\n\n- \u5728 `ExcelWorkbook` \u5c42\uff1a\n  - `apply_format_fix_on_save=True` \u4ec5\u5bf9 `.xlsx` \u5728 `save()` \u540e\u8fdb\u884c\u4fee\u8865\uff1b`preview_temp()` \u4e5f\u4f1a\u5e94\u7528\uff1b`get_bytes()` \u4e0d\u505a\u4fee\u6539\u3002\n  - `format_fix_config=FormatFixConfig(...)` \u914d\u7f6e\u5177\u4f53\u89c4\u5219\u3002\n\n```python\nfrom sheetcraft import ExcelWorkbook, FormatFixConfig\n\nwb = ExcelWorkbook(\n    output_path='out.xlsx',\n    fast=True,\n    apply_format_fix_on_save=True,\n    format_fix_config=FormatFixConfig(prefix_drawing_anchors=True)\n)\nws = wb.add_sheet('Report')\n# ... \u5199\u5165\u6570\u636e ...\nwb.save()  # \u4fdd\u5b58\u540e\u81ea\u52a8\u8fdb\u884c\u683c\u5f0f\u4fee\u590d\uff08\u4ec5 .xlsx\uff09\n```\n\n- \u5728 `ExcelTemplate` \u6e32\u67d3\u5c42\uff1a\n  - `apply_format_fix=True` \u5728\u6e32\u67d3\u4fdd\u5b58\u540e\u5bf9 `.xlsx` \u8fdb\u884c\u4fee\u8865\u3002\n  - `format_fix_config=FormatFixConfig(...)` \u914d\u7f6e\u5177\u4f53\u89c4\u5219\u3002\n\n```python\nfrom sheetcraft import ExcelTemplate, FormatFixConfig\n\nrenderer = ExcelTemplate(\n    apply_format_fix=True,\n    format_fix_config=FormatFixConfig(prefix_drawing_anchors=True)\n)\nrenderer.render('template.xlsx', data, 'rendered.xlsx')\n```\n\n\u8bf4\u660e\uff1a\u4fee\u590d\u8fc7\u7a0b\u53ea\u8c03\u6574\u7ed3\u6784\u4e0e\u547d\u540d\u7a7a\u95f4\uff0c\u4e0d\u6539\u53d8\u5355\u5143\u683c\u6570\u636e\u3002\u82e5\u4fee\u590d\u5931\u8d25\u4e0d\u4f1a\u4e2d\u65ad\u4e3b\u6d41\u7a0b\uff08\u4f1a\u8bb0\u5f55\u62a5\u544a\u6216\u629b\u51fa\u8be6\u7ec6\u5f02\u5e38\u7528\u4e8e\u6392\u67e5\uff09\u3002\n\n## Styles and Formatting\n\nA simple style dict can include:\n\n- `font`: `name`, `size`, `bold`, `italic`, `underline`, `color`\n- `align`: `horizontal` (`left|center|right`), `vertical` (`top|center|bottom`), `wrap`\n- `fill`: `color` (e.g., `#FFEECC`)\n- `border`: `left|right|top|bottom` flags and optional `color`\n- `number_format`: Excel number format string (e.g., `\"#,##0.00\"`, `\"yyyy-mm-dd\"`)\n\n```python\nprice_style = {'number_format': '#,##0.00'}\nwb.write_cell(ws, 2, 3, 19.99, price_style)\n```\n\n## Data Validation\n\n```python\n# Allow only values from a list\nwb.add_data_validation(ws, 'E2:E100', DataValidationSpec(type='list', formula1='\"Small,Medium,Large\"'))\n\n# Date between two bounds\nwb.add_data_validation(ws, 'F2:F100', DataValidationSpec(type='date', operator='between', formula1='DATE(2024,1,1)', formula2='DATE(2024,12,31)'))\n```\n\nNote: `.xls` (xlwt) does not support data validation creation.\n\n## Formula Support\n\nWrite formulas with `set_formula` or pass strings starting with `=` in `write_cell`.\n\nOptional evaluation using xlcalculator:\n\n```python\nfrom sheetcraft.formulas import evaluate_xlsx_formulas\nresults = evaluate_xlsx_formulas('out.xlsx')\nfor (sheet, cell), value in results.items():\n    print(sheet, cell, value)\n```\n\n## Multi-Sheet Operations\n\n```python\nwb = ExcelWorkbook(output_path='multi.xlsx', fast=False)\nws1 = wb.add_sheet('Summary')\nws2 = wb.add_sheet('Data')\nwb.write_cell(ws1, 1, 1, 'Overview')\nwb.write_rows(ws2, 1, [[1,2,3],[4,5,6],[7,8,9]])\nwb.save()\n```\n\n## Legacy .xls Support\n\n```python\nwb = ExcelWorkbook(output_path='legacy.xls', file_format='xls')\nws = wb.add_sheet('Sheet1')\nwb.write_rows(ws, 1, [[\"A\", 1], [\"B\", 2]])\nwb.insert_image(ws, 1, 3, 'logo.jpg')  # converted to BMP automatically\nwb.save()\n```\n\nConstraints: `.xls` has limited styling, image, and no data validation creation.\n\n## Performance for Large Datasets\n\n- Use `fast=True` to write with xlsxwriter for very large `.xlsx` exports.\n- For openpyxl, set `write_only=True` to stream rows efficiently.\n\n```python\nwb = ExcelWorkbook(output_path='big.xlsx', fast=True)\nws = wb.add_sheet('Data')\nfor i in range(2, 100_002):\n    wb.write_row(ws, i, [f'Item {i}', i, i * 1.23])\nwb.save()\n```\n\n## \u6280\u672f\u5b9e\u73b0\u7ec6\u8282\u6982\u89c8\n\n- \u5f15\u64ce\u9009\u62e9\uff1a\n  - `.xlsx` \u9ed8\u8ba4\u4f7f\u7528 `openpyxl`\uff1b`fast=True` \u65f6\u4f7f\u7528 `xlsxwriter`\uff08\u66f4\u5feb\u5199\u5165\uff0c\u90e8\u5206\u529f\u80fd\u6709\u9650\u5236\uff09\u3002\n  - `.xls` \u4f7f\u7528 `xlwt`\uff08\u6837\u5f0f\u652f\u6301\u6709\u9650\u3001\u65e0\u6570\u636e\u9a8c\u8bc1\u521b\u5efa\u80fd\u529b\uff09\u3002\n  - `write_only=True` \u53ef\u5728 `openpyxl` \u4e0b\u6d41\u5f0f\u5199\u5165\u4ee5\u964d\u4f4e\u5185\u5b58\u3002\n- \u6838\u5fc3\u62bd\u8c61\uff1a\n  - `ExcelWorkbook` \u63d0\u4f9b\u5de5\u4f5c\u8868\u7ba1\u7406\uff08`add_sheet/get_sheet`\uff09\u3001\u5355\u5143\u683c\u4e0e\u884c\u5199\u5165\uff08`write_cell/row/rows`\uff09\u3001\u884c\u5217\u5c3a\u5bf8\u3001\u5408\u5e76\u5355\u5143\u683c\u3001\u56fe\u7247\u63d2\u5165\u3001\u6570\u636e\u9a8c\u8bc1\u7b49\u3002\n  - \u6837\u5f0f\u901a\u8fc7\u7edf\u4e00\u5b57\u5178\u8fdb\u884c\u63cf\u8ff0\uff0c\u5185\u90e8\u6620\u5c04\u5230\u4e0d\u540c\u5f15\u64ce\uff1a`styles.py` \u4e2d\u7684\u989c\u8272\u89c4\u8303\u5316\uff08`_normalize_color`\uff09\u3001`xlsxwriter_format_from_dict` \u4e0e `xlwt_style_from_dict` \u7b49\u3002\n- \u6a21\u677f\u6e32\u67d3\uff1a\n  - `ExcelTemplate.render` \u57fa\u4e8e Jinja2\uff0c\u5c06\u5355\u5143\u683c\u4e2d\u7684\u5360\u4f4d\u7b26\u4e0e `{% for %}` \u5757\u89e3\u6790\u5e76\u6e32\u67d3\uff1b\u591a\u884c\u5757\u5bb9\u91cf=\u6a21\u677f\u884c\u6570\uff0c\u517c\u5bb9\u5e38\u89c1\u5bfc\u51fa\u573a\u666f\u3002\n- \u683c\u5f0f\u4fee\u590d\uff1a\n  - `format_fix.py` \u4e0e\u751f\u6210\u6d41\u7a0b\u89e3\u8026\uff0c\u4ec5\u5728\u4fdd\u5b58\u540e\u5bf9 `.xlsx` \u8fdb\u884c\u7ed3\u6784\u6027\u4fee\u8865\uff08\u5982\u8865\u5168\u7ed8\u56fe\u951a\u70b9\u547d\u540d\u7a7a\u95f4\uff09\uff0c\u4fdd\u8bc1\u6570\u636e\u4e0d\u53d8\u3002\n- \u516c\u5f0f\u8bc4\u4f30\uff1a\n  - `formulas.py` \u63d0\u4f9b `evaluate_xlsx_formulas`\uff0c\u53ef\u9009\u4f9d\u8d56 `xlcalculator` \u8fdb\u884c\u516c\u5f0f\u8ba1\u7b97\u5e76\u8fd4\u56de\u7ed3\u679c\u5b57\u5178\u3002\n- \u9884\u89c8\u4e0e\u5b57\u8282\uff1a\n  - `ExcelWorkbook.preview_temp()` \u751f\u6210\u4e34\u65f6\u6587\u4ef6\u7528\u4e8e\u524d\u7aef\u9884\u89c8\uff08\u82e5\u542f\u7528\u4fee\u590d\u5219\u4e5f\u5e94\u7528\uff09\uff1b`get_bytes()` \u76f4\u63a5\u8fd4\u56de\u5185\u5b58\u5b57\u8282\uff0c\u4e0d\u505a\u4fee\u590d\u3002\n- \u65e5\u5fd7\u4e0e\u9519\u8bef\uff1a\n  - \u5173\u952e\u8def\u5f84\u4f7f\u7528 `logging` \u8bb0\u5f55\u4fee\u590d\u4e0e\u6e32\u67d3\u62a5\u544a\uff1b\u5f02\u5e38\u5747\u5c3d\u91cf\u5305\u542b\u4e0a\u4e0b\u6587\uff0c\u4fbf\u4e8e\u5b9a\u4f4d\u95ee\u9898\u3002\n\n## Project Structure\n\n```\nsheetcraft/\n  __init__.py\n  workbook.py\n  styles.py\n  images.py\n  validation.py\n  template.py\n  formulas.py\nexamples/\n  export_basic.py\n  template_render.py\n  image_insert.py\n  multi_sheet.py\npyproject.toml\nREADME.md\n```\n\n## \u81f4\u8c22\n\n\u672c\u9879\u76ee\u611f\u8c22\u4ee5\u4e0b\u5f00\u6e90\u9879\u76ee\u53ca\u5176\u4f5c\u8005\u4e0e\u7ef4\u62a4\u8005\uff08\u81f4\u8c22\u8be6\u60c5\u89c1 `NOTICE`\uff09\uff1a\n- openpyxl\u3001XlsxWriter\u3001xlwt\u3001xlrd\u3001Jinja2\u3001Pillow\u3001xlcalculator\n- \u5f00\u53d1\u5de5\u5177\uff1apytest\u3001pytest-cov\u3001pytest-benchmark\n\n## \u517c\u5bb9\u6027\u4e0e\u9650\u5236\n\n- `.xlsx`\uff1a\n  - `openpyxl` \u529f\u80fd\u66f4\u5b8c\u6574\uff1b\u9002\u5408\u591a\u6570\u6837\u5f0f\u4e0e\u6570\u636e\u9a8c\u8bc1\u573a\u666f\u3002\n  - `xlsxwriter` \u5728 `fast=True` \u65f6\u7528\u4e8e\u66f4\u5feb\u5199\u5165\uff0c\u90e8\u5206\u9ad8\u7ea7\u6837\u5f0f/\u7279\u6027\u53ef\u80fd\u6709\u9650\u5236\uff1b\u5efa\u8bae\u5927\u6570\u636e\u91cf\u5bfc\u51fa\u4f7f\u7528\u3002\n- `.xls`\uff1a\n  - \u6837\u5f0f\u80fd\u529b\u6709\u9650\u3001\u56fe\u7247\u9700 BMP \u56de\u9000\u3001\u4e0d\u53ef\u521b\u5efa\u6570\u636e\u9a8c\u8bc1\uff1b\u9002\u5408\u517c\u5bb9\u65e7\u7cfb\u7edf\u7684\u57fa\u7840\u5bfc\u51fa\u3002\n- \u6a21\u677f\u6e32\u67d3\uff1a\n  - \u652f\u6301\u5355\u5143\u683c\u5360\u4f4d\u7b26\u4e0e `{% for %}` \u91cd\u590d\u5757\uff1b\u591a\u884c\u5757\u7684\u5bb9\u91cf=\u6a21\u677f\u884c\u6570\u3002\n  - \u4e0d\u652f\u6301\u8de8\u5de5\u4f5c\u8868\u590d\u6742\u5f15\u7528\u7684\u81ea\u52a8\u5c55\u5f00\uff1b\u5982\u9700\u66f4\u590d\u6742\u903b\u8f91\u5efa\u8bae\u7528 Python \u9884\u5904\u7406\u6570\u636e\u3002\n- \u516c\u5f0f\u8bc4\u4f30\uff1a\n  - \u4f9d\u8d56 `xlcalculator`\uff0c\u4ec5\u5bf9 `.xlsx` \u63d0\u4f9b\u53ef\u9009\u8bc4\u4f30\uff1b\u67d0\u4e9b Excel \u7279\u6027\uff08\u5982\u5916\u90e8\u5f15\u7528\u3001\u5b8f\uff09\u4e0d\u5728\u652f\u6301\u8303\u56f4\u5185\u3002\n- \u683c\u5f0f\u4fee\u590d\u6a21\u5757\uff1a\n  - \u4ec5\u5bf9 `.xlsx` \u5728\u4fdd\u5b58\u540e\u8fdb\u884c\u7ed3\u6784\u4fee\u8865\uff1b\u4e0d\u6539\u53d8\u5355\u5143\u683c\u6570\u636e\u3002\n  - \u5f53\u524d\u4e3b\u8981\u9002\u7528\u7ed8\u56fe\u951a\u70b9\u547d\u540d\u7a7a\u95f4\u4fee\u8865\uff1b\u540e\u7eed\u53ef\u6309\u9700\u6269\u5c55\u66f4\u591a\u89c4\u5219\u3002\n\n## License\n\nApache License 2.0\u3002\u8be6\u89c1 `LICENSE`\u3002\n\nRepository: https://github.com/getaix/sheetcraft.git\n",
    "bugtrack_url": null,
    "license": "Apache License\n                                   Version 2.0, January 2004\n                                http://www.apache.org/licenses/\n        \n           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n        \n           1. Definitions.\n        \n              \"License\" shall mean the terms and conditions for use, reproduction,\n              and distribution as defined by Sections 1 through 9 of this document.\n        \n              \"Licensor\" shall mean the copyright owner or entity authorized by\n              the copyright owner that is granting the License.\n        \n              \"Legal Entity\" shall mean the union of the acting entity and all\n              other entities that control, are controlled by, or are under common\n              control with that entity. For the purposes of this definition,\n              \"control\" means (i) the power, direct or indirect, to cause the\n              direction or management of such entity, whether by contract or\n              otherwise, or (ii) ownership of fifty percent (50%) or more of the\n              outstanding shares, or (iii) beneficial ownership of such entity.\n        \n              \"You\" (or \"Your\") shall mean an individual or Legal Entity\n              exercising permissions granted by this License.\n        \n              \"Source\" form shall mean the preferred form for making modifications,\n              including but not limited to software source code, documentation\n              source, and configuration files.\n        \n              \"Object\" form shall mean any form resulting from mechanical\n              transformation or translation of a Source form, including but\n              not limited to compiled object code, generated documentation,\n              and conversions to other media types.\n        \n              \"Work\" shall mean the work of authorship, whether in Source or\n              Object form, made available under the License, as indicated by a\n              copyright notice that is included in or attached to the work\n              (an example is provided in the Appendix below).\n        \n              \"Derivative Works\" shall mean any work, whether in Source or Object\n              form, that is based on (or derived from) the Work and for which the\n              editorial revisions, annotations, elaborations, or other modifications\n              represent, as a whole, an original work of authorship. For the purposes\n              of this License, Derivative Works shall not include works that remain\n              separable from, or merely link (or bind by name) to the interfaces of,\n              the Work and Derivative Works thereof.\n        \n              \"Contribution\" shall mean any work of authorship, including\n              the original version of the Work and any modifications or additions\n              to that Work or Derivative Works thereof, that is intentionally\n              submitted to Licensor for inclusion in the Work by the copyright owner\n              or by an individual or Legal Entity authorized to submit on behalf of\n              the copyright owner. For the purposes of this definition, \"submitted\"\n              means any form of electronic, verbal, or written communication sent\n              to the Licensor or its representatives, including but not limited to\n              communication on electronic mailing lists, source code control systems,\n              and issue tracking systems that are managed by, or on behalf of, the\n              Licensor for the purpose of discussing and improving the Work, but\n              excluding communication that is conspicuously marked or otherwise\n              designated in writing by the copyright owner as \"Not a Contribution.\"\n        \n              \"Contributor\" shall mean Licensor and any individual or Legal Entity\n              on behalf of whom a Contribution has been received by Licensor and\n              subsequently incorporated within the Work.\n        \n           2. Grant of Copyright License. Subject to the terms and conditions of\n              this License, each Contributor hereby grants to You a perpetual,\n              worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n              copyright license to reproduce, prepare Derivative Works of,\n              publicly display, publicly perform, sublicense, and distribute the\n              Work and such Derivative Works in Source or Object form.\n        \n           3. Grant of Patent License. Subject to the terms and conditions of\n              this License, each Contributor hereby grants to You a perpetual,\n              worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n              (except as stated in this section) patent license to make, have made,\n              use, offer to sell, sell, import, and otherwise transfer the Work,\n              where such license applies only to those patent claims licensable\n              by such Contributor that are necessarily infringed by their\n              Contribution(s) alone or by combination of their Contribution(s)\n              with the Work to which such Contribution(s) was submitted. If You\n              institute patent litigation against any entity (including a\n              cross-claim or counterclaim in a lawsuit) alleging that the Work\n              or a Contribution incorporated within the Work constitutes direct\n              or contributory patent infringement, then any patent licenses\n              granted to You under this License for that Work shall terminate\n              as of the date such litigation is filed.\n        \n           4. Redistribution. You may reproduce and distribute copies of the\n              Work or Derivative Works thereof in any medium, with or without\n              modifications, and in Source or Object form, provided that You\n              meet the following conditions:\n        \n              (a) You must give any other recipients of the Work or\n                  Derivative Works a copy of this License; and\n        \n              (b) You must cause any modified files to carry prominent notices\n                  stating that You changed the files; and\n        \n              (c) You must retain, in the Source form of any Derivative Works\n                  that You distribute, all copyright, patent, trademark, and\n                  attribution notices from the Source form of the Work,\n                  excluding those notices that do not pertain to any part of\n                  the Derivative Works; and\n        \n              (d) If the Work includes a \"NOTICE\" text file as part of its\n                  distribution, then any Derivative Works that You distribute must\n                  include a readable copy of the attribution notices contained\n                  within such NOTICE file, excluding those notices that do not\n                  pertain to any part of the Derivative Works, in at least one\n                  of the following places: within a NOTICE text file distributed\n                  as part of the Derivative Works; within the Source form or\n                  documentation, if provided along with the Derivative Works; or,\n                  within a display generated by the Derivative Works, if and\n                  wherever such third-party notices normally appear. The contents\n                  of the NOTICE file are for informational purposes only and\n                  do not modify the License. You may add Your own attribution\n                  notices within Derivative Works that You distribute, alongside\n                  or as an addendum to the NOTICE text from the Work, provided\n                  that such additional attribution notices cannot be construed\n                  as modifying the License.\n        \n              You may add Your own copyright statement to Your modifications and\n              may provide additional or different license terms and conditions\n              for use, reproduction, or distribution of Your modifications, or\n              for any such Derivative Works as a whole, provided Your use,\n              reproduction, and distribution of the Work otherwise complies with\n              the conditions stated in this License.\n        \n           5. Submission of Contributions. Unless You explicitly state otherwise,\n              any Contribution intentionally submitted for inclusion in the Work\n              by You to the Licensor shall be under the terms and conditions of\n              this License, without any additional terms or conditions.\n              Notwithstanding the above, nothing herein shall supersede or modify\n              the terms of any separate license agreement you may have executed\n              with Licensor regarding such Contributions.\n        \n           6. Trademarks. This License does not grant permission to use the trade\n              names, trademarks, service marks, or product names of the Licensor,\n              except as required for reasonable and customary use in describing the\n              origin of the Work and reproducing the content of the NOTICE file.\n        \n           7. Disclaimer of Warranty. Unless required by applicable law or\n              agreed to in writing, Licensor provides the Work (and each\n              Contributor provides its Contributions) on an \"AS IS\" BASIS,\n              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n              implied, including, without limitation, any warranties or conditions\n              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n              PARTICULAR PURPOSE. You are solely responsible for determining the\n              appropriateness of using or redistributing the Work and assume any\n              risks associated with Your exercise of permissions under this License.\n        \n           8. Limitation of Liability. In no event and under no legal theory,\n              whether in tort (including negligence), contract, or otherwise,\n              unless required by applicable law (such as deliberate and grossly\n              negligent acts) or agreed to in writing, shall any Contributor be\n              liable to You for damages, including any direct, indirect, special,\n              incidental, or consequential damages of any character arising as a\n              result of this License or out of the use or inability to use the\n              Work (including but not limited to damages for loss of goodwill,\n              work stoppage, computer failure or malfunction, or any and all\n              other commercial damages or losses), even if such Contributor\n              has been advised of the possibility of such damages.\n        \n           9. Accepting Warranty or Additional Liability. While redistributing\n              the Work or Derivative Works thereof, You may choose to offer,\n              and charge a fee for, acceptance of support, warranty, indemnity,\n              or other liability obligations and/or rights consistent with this\n              License. However, in accepting such obligations, You may act only\n              on Your own behalf and on Your sole responsibility, not on behalf\n              of any other Contributor, and only if You agree to indemnify,\n              defend, and hold each Contributor harmless for any liability\n              incurred by, or claims asserted against, such Contributor by reason\n              of your accepting any such warranty or additional liability.\n        \n           END OF TERMS AND CONDITIONS\n        \n           APPENDIX: How to apply the Apache License to your work.\n        \n              To apply the Apache License to your work, attach the following\n              boilerplate notice, with the fields enclosed by brackets \"[]\"\n              replaced with your own identifying information. (Don't include\n              the brackets!)  The text should be enclosed in the appropriate\n              comment syntax for the file format. We also recommend that a\n              file or class name and description of purpose be included on the\n              same \"printed page\" as the copyright notice for easier\n              identification within third-party archives.\n        \n           Copyright [2025] [GetAIx contributors]\n        \n           Licensed under the Apache License, Version 2.0 (the \"License\");\n           you may not use this file except in compliance with the License.\n           You may obtain a copy of the License at\n        \n               http://www.apache.org/licenses/LICENSE-2.0\n        \n           Unless required by applicable law or agreed to in writing, software\n           distributed under the License is distributed on an \"AS IS\" BASIS,\n           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n           See the License for the specific language governing permissions and\n           limitations under the License.",
    "summary": "Flexible, intuitive Excel processing library for .xlsx and .xls",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/getaix/sheetcraft",
        "Repository": "https://github.com/getaix/sheetcraft.git"
    },
    "split_keywords": [
        "excel",
        " xlsx",
        " xls",
        " openpyxl",
        " xlsxwriter",
        " xlwt",
        " template",
        " data validation",
        " images"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0f53a36c1061935d34017f2b34436831e01eacd92ac17a743f6f85455a6cd957",
                "md5": "339054c2fd6b447614de0d4d4f892ab1",
                "sha256": "43603a276e984c61060cb475b463f15beadac030b42c5b8a4153f5a1f215cf54"
            },
            "downloads": -1,
            "filename": "sheetcraft-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "339054c2fd6b447614de0d4d4f892ab1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 43287,
            "upload_time": "2025-10-20T08:47:33",
            "upload_time_iso_8601": "2025-10-20T08:47:33.723154Z",
            "url": "https://files.pythonhosted.org/packages/0f/53/a36c1061935d34017f2b34436831e01eacd92ac17a743f6f85455a6cd957/sheetcraft-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "229d1e51000bf82a3f89cfc2f6df96a44474ff53f71ca7a2a6028ed47fd5117e",
                "md5": "be663239b187abed6e67dda161286593",
                "sha256": "da501fb0cc32857ecf93c28140e3f82473409d85cf77dea18f74808edee1166c"
            },
            "downloads": -1,
            "filename": "sheetcraft-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "be663239b187abed6e67dda161286593",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 60099,
            "upload_time": "2025-10-20T08:47:34",
            "upload_time_iso_8601": "2025-10-20T08:47:34.930704Z",
            "url": "https://files.pythonhosted.org/packages/22/9d/1e51000bf82a3f89cfc2f6df96a44474ff53f71ca7a2a6028ed47fd5117e/sheetcraft-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-20 08:47:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "getaix",
    "github_project": "sheetcraft",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "sheetcraft"
}
        
Elapsed time: 1.77213s