| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Runnable Python examples for IronXL for Python, an Excel library that reads, writes, and edits XLSX, XLS, CSV, and TSV files without Microsoft Office or COM Interop.
pip install ironxlfrom ironxl import *
License.LicenseKey = "YOUR-LICENSE-KEY"
# Load an existing workbook and read a cell
workbook = WorkBook.Load("sample.xlsx")
worksheet = workbook.WorkSheets[0]
print(worksheet["A2"].Value)
# Indexing with a range string returns an iterable Range
for cell in worksheet["A2:B10"]:
print(f"Cell {cell.AddressString} has value '{cell.Text}'")
# Write a value and save
worksheet["C1"].Value = "Updated"
workbook.SaveAs("updated.xlsx")IronXL for Python wraps the .NET library, so members keep their .NET PascalCase names — SaveAs, not save_as, and WorkSheets, not worksheets. A snake_case attribute is a sign the call is wrong. Ranges are reached by indexing the worksheet with a range string; there is no range() method.
WorkBook.Create(ExcelFileFormat.XLSX) starts a new workbook and requires a license key, unlike loading, so set License.LicenseKey before creating.
Each folder contains a self-contained project with a requirements.txt. Run pip install -r requirements.txt, then python program.py:
Python 3.7 and above. Windows, macOS, and Linux. See the documentation for environment-specific notes.
This repository is maintained by Iron Software. IronXL for Python is a commercial library — see licensing for terms and trial details.
| Back | FazBrowse Home | New Git URL |