Should I be using openpyxl or pandas to read/write spreadsheets?

Python v3.11 on Windows 10.

I will be reading and writing Excel spreadsheets, either XLS or XLSX. Should I be using openpyxl to do this or pandas? Is one newer or better supported?

Pandas doesn’t actually read or write spreadsheets. It just calls libraries like openpyxl or xlsxwriter under the hood so unless you’re going to be using pandas dataframes anyway, using pandas is just bloat.

2 Likes