Skip to main content

xlPandas

Read and write Excel xlsx using pandas/openpyxl without destroying formatting.

Sometimes you have a nicely formatted worksheet, but you'd like to work with it using pandas, or perhaps you want to write data to an Excel template.

Pandas can read and write Excel files using xlrd, but treats them like csvs. xlPandas uses openpyxl to access data while preserving template formatting, macros, and other worksheet attributes.

Install

pip install xlpandas

Example

import xlpandas as xpd

# Read excel file
df = xpd.read_file('template.xlsx', skiprows=2)
print(df.columns)

# Modify dataframe
df['new_column'] = True

# Access openpyxl worksheet
sheet = df.to_sheet()
sheet.cell(1,1).value = 'title'

# From openpyxl worksheet
df = xpd.xlDataFrame(sheet)

# Write file
df.to_file('out.xlsx')

Metadata

Release files for xlpandas 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xlpandas 0.1.4
File Size Uploaded
xlpandas-0.1.4.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xlpandas 0.1.4
File Interpreter ABI Platform
xlpandas-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 7.1 kB

Release files / xlpandas-0.1.4.tar.gz

Download URL xlpandas-0.1.4.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e047d99c119f3896720a925e0464e1521925bccf7cb9ba68448e63cb74a1e5c0
BLAKE2b-256 checksum
How to use checksums
831fdae3a1bcd8b7fe2c7e36c22b3d4331ce0e45b4ea3f95965189baed2d64b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.7

Release files / xlpandas-0.1.4-py3-none-any.whl

Download URL xlpandas-0.1.4-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d27c6d475feca524bef2634183f3ccea2d00c34fca2dd75aec1f04512f7d51b5
BLAKE2b-256 checksum
How to use checksums
f2e19dadc1e85af6c664eb4d96b037f9e4cd519424dd454cfcb6a961c2d94448
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page