Convert Parquet to Excel with Python
Run this Python script locally with Apache Arrow. The script reads your local file rather than sending it to this website.
Before you start
- Install Python 3 and create an isolated environment using the commands below.
- Place input.parquet in your working folder. Use a new output filename and keep the original.
- Save the Python code as task.py. On macOS/Linux run .venv/bin/python task.py; on Windows PowerShell run .venv\Scripts\python.exe task.py.
python3 -m venv .venv
.venv/bin/python -m pip install pyarrow openpyxlpy -m venv .venv
.venv\Scripts\python.exe -m pip install pyarrow openpyxlimport pyarrow.parquet as pq
table = pq.read_table("input.parquet")
from openpyxl import Workbook
book = Workbook()
sheet = book.active
sheet.append(table.column_names)
for cell in sheet[1]:
cell.data_type = "s"
for row in table.to_pylist():
sheet.append([None if row[name] is None else str(row[name]) for name in table.column_names])
for cell in sheet[sheet.max_row]:
if cell.value is not None:
cell.data_type = "s"
book.save("output.xlsx")
print("Saved output.xlsx")Limits and output
- These examples load the complete table in memory. Use small representative files first; use an explicit Arrow schema when inferred types do not match your intended values.
- The CLI/library examples use their own type mappings, which can differ from this website’s text-column conversion. Keep the source and compare nulls, identifiers, timestamps, decimals and nested values.
- All populated output cells are strings, protecting identifiers and formula-looking values. This does not preserve Parquet types. Excel worksheet row/column and cell-length limits still apply.
Documentation: Apache Arrow Parquet documentation; openpyxl tutorial