Python Excel库
查看最新消息:变更日志
在 Python 中读取 Excel 文件
查看所有%s代码示例from ironxl import *
# Supported for XLSX, XLS, XLSM, XLTX, CSV, and TSV
workbook = WorkBook.Load("sample.xlsx")
# Select worksheet at index 0
worksheet = workbook.WorkSheets[0]
# Get any existing worksheet
first_sheet = workbook.DefaultWorkSheet
# Select a cell and return the converted value
cell_value = worksheet["A2"].IntValue
# Read from ranges of cells elegantly.
for cell in worksheet["A2:A10"]:
print("Cell {} has value '{}'".format(cell.AddressString, cell.Text))
# Calculate aggregate values such as Min, and Sum
total_sum = worksheet["A2:A10"].Sum()探索代码,通过PyPI安装IronXL 适用于 Python
Works with AI Coding Agents
Claude
Codex
GitHub Copilot
Cursor
Antigravity
Other coding agents
Runs Inside Your Infrastructure
No MCPs or external processing. IronXL runs inside your application, keeping documents in your control.
AI-ready Documentation
Clear documentation, API references, and tutorials help coding agents use IronXL effectively.
Built for Enterprise Workflows
Add enterprise-grade document capabilities where accuracy, consistency, and control matters.
跨平台支持
为在.NET 10, 9, 8, 7, 6, 5, Core, Standard, or Framework上运行的C#, F#, & VB.NET而设计
一个优先考虑精准性和易用性的Python Excel库。
IronXL for Python是用于生成和编辑Excel文档的领先Python Excel库。其用户友好的API允许开发人员在几分钟内将Excel功能添加到Python项目中。
立即获取您的免费30 天试用密钥。
兼容性
.平台:
- Python 3.7+
操作系统:
- 微软Windows
- macOS
- Linux
- Docker
- Azure
- AWS
集成开发环境
- Jetbrains PyCharm
- 其他 Python IDEs
工作簿
创建或加载电子表格
- XLS
- XLSX, XSLT, XLSM
- CSV
- TSV
保存或导出格式
- XLS
- XLSX, XSLT, XLSM
- CSV
- TSV
- JSON
- HTML
- 二进制
- 字节数组
编辑工作簿
- 元数据
- 权限和密码
- 创建和删除工作表
- 设置工作表位置
- 设置活动选项卡
工作表
编辑公式:
- 与Excel公式一起工作
- 工作表编辑时重新计算
排序数据:
- 范围
- 列
- 行
创建和编辑图表:
- 面积图、条形图、柱状图、折线图、饼图、散点图
编辑布局:
- 冻结窗格
- 自动调整行/列大小
- 添加和删除行/列
编辑工作表:
- 复制
- 密码保护
- 分组和取消分组
- 添加、删除和提取图像
单元格范围
单元格范围函数:
- 排序
- 修剪
- 清除
- 复制
- 查找和替换
- 设置超链接
- 合并和拆分单元格
样式单元格:
- 字体和大小
- 边框和对齐
- 背景图案
- 条件格式
数学函数:
- 平均值和总和
- 最小值和最大值
设置单元格数据格式:
- 文本、数字、公式、日期、货币、科学、时间、布尔、自定义格式


