Documentation
README
Excel Spreadsheet Processing
Use openpyxl to read and write .xlsx files.
Quick Start
from openpyxl import load_workbook
wb = load_workbook("input.xlsx")
ws = wb["Sheet1"]
value = ws["A1"].value
ws["B2"] = 42
ws["C2"] = "=SUM(A2:B2)"
wb.save("output.xlsx")
Use this for direct cell edits, formula updates, and simple workbook changes.
Reading Data with pandas
import pandas as pd
df = pd.read_excel('file.xlsx') # First sheet
all_sheets = pd.read_excel('file.xlsx', sheet_name=None) # All sheets as dict
Common Pitfalls
This is the opening of the README. Read the full README on GitHub.