Python Excel 函式庫
- 直覺式的 Python 3+ Excel 文件 API
- 無需安裝 Microsoft Office 或 Excel Interop
- 閱讀、編輯及建立 Excel 試算表檔案
- 提供 .NET 與 Python 版本
查看最新動態:變更紀錄
在 Python 中讀取 Excel 檔案
查看所有 程式碼範例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 for Python
跨平台支援
專為運行在 .NET 10, 9, 8, 7, 6, 5, Core, Standard 或 Framework 的 C#, F#, 和 VB.NET 設計
一款以精準度與易用性為優先考量之 Python Excel 函式庫。
IronXL for Python 是用於建立和編輯 Excel 文件的頂尖 Python Excel 程式庫。其友善的 API 讓開發人員能在數分鐘內為 Python 專案增添 Excel 功能。
立即獲取您的30天試用金鑰。
相容性
平台:
- Python 3.7+
作業系統:
- Microsoft Windows
- macOS
- Linux
- Docker
- Azure
- AWS
IDE
- Jetbrains PyCharm
- 其他 Python IDE
工作簿
建立或載入電子表格
- XLS
- XLSX, XSLT, XLSM
- CSV
- TSV
儲存或匯出格式
- XLS
- XLSX, XSLT, XLSM
- CSV
- TSV
- JSON
- HTML
- 二進位
- 位元組陣列
編輯工作簿
- 中繼資料
- 權限及密碼
- 建立和刪除工作表
- 設置工作表位置
- 設置為活躍標籤
工作表
編輯公式:
- 支持 Excel 公式
- 在工作表編輯時重新計算
排序資料:
- 範圍
- 列
- 行
建立和編輯圖表:
- 區域,條形,柱狀,線條,餅圖,散佈
編輯佈局:
- 凍結窗格
- 自動調整行/列
- 新增及刪除行/列
編輯工作表:
- 重複
- 使用密碼保護
- 分組及取消分組
- 新增、刪除及提取圖片
儲存格範圍
儲存格範圍功能:
- 排序
- 修剪
- 清除
- 複製
- 尋找及替換
- 設置超連結
- 合併及取消合併儲存格
儲存格樣式:
- 字型和大小
- 邊框及對齊
- 背景圖案
- 條件格式
數學功能:
- 平均及總和
- 最小值及最大值
設置儲存格資料格式:
- 文字,數字,公式,日期,貨幣,科學,時間,布林,自定義格式


