A chainable worksheet iterator utility based on XlsxWriter.
Project description
worksheet-iterator
worksheet-iterator 提供一个基于 XlsxWriter 的 WorkSheetIterator 类,用于以链式方式在工作表中写入和格式化单元格。
安装
pip install worksheet-iterator
使用示例
下面的示例与仓库根目录下的 demo.py 一致,展示了如何使用 WorkSheetIterator 在工作表中链式写入数据:
from worksheet_iterator import WorkSheetIterator
import xlsxwriter
wb = xlsxwriter.Workbook("demo.xlsx")
# 创建一个工作表迭代器,指向 Sheet1
it = WorkSheetIterator(wb, "Sheet1")
# 在第一个单元格写入 "ok",然后移动到下一列写入 42
it.set_value("ok").next_column().set_value(42)
wb.close()
主要特性
- 基于 XlsxWriter 的工作表写入工具
- 支持链式调用(如
set_value().next_column().set_value()) - 更易于组织和维护复杂的 Excel 写入逻辑
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file worksheet_iterator-0.1.4.tar.gz.
File metadata
- Download URL: worksheet_iterator-0.1.4.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e601be51d49f5e3c86f7bd00759f3de7e0890df33d3fb53e2dc20c9d5029eebe
|
|
| MD5 |
bcc833c360a75ef7531257fafd8aeb80
|
|
| BLAKE2b-256 |
12df4f7ccd591fa44f2704cc18dc8972d6ecb4a7cdc011e82309a04575330919
|
File details
Details for the file worksheet_iterator-0.1.4-py3-none-any.whl.
File metadata
- Download URL: worksheet_iterator-0.1.4-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcec177ec8e8bd2e40e813b826441b8132db6db8bdcc967e44a906e9acd3311c
|
|
| MD5 |
9219fa7f6dab7ab30018188cda0c785a
|
|
| BLAKE2b-256 |
6f89ecae30d5fe5c84c405ebda3180148ea095874ca8cf634736e4e73932ede3
|