How to fix xlrd error xlsx file not supported in Excel using Pandas

July 22, 2022
4.7K Views
0

A free Office suite fully compatible with Microsoft Office

Free Download
Free download

xlrd error xlsx file not supported in excel is the most common error that comes in the way of opening .xlsx files with Microsoft Excel software. This problem occurs when you try to open or make changes in the .xlsx file using any version of Microsoft Office mostly when you are doing programming. It may also happen if you are working on a computer that is unable to work properly with .xlsx documents. The above-mentioned situation comes when you attempt to open such files on a computer that has problems regarding running applications of this kind because they are written to run on specific Windows platforms like Windows 7 and 8, Windows 10, and so on.

It is not uncommon to open an xlsx file in Excel and run into an xlrd error. When an xlrd error occurs in Excel, then you will get this error that says the xlsx file format is not supported in Excel and need to fix it. And today we will be discussing all the methods which can help you to fix xlrd error xlsx file not supported in the excel problem

Tips that are provided in this article are compatible with versions 2010/2013/2016.

How to fix xlrd error xlsx file not supported in excel: Upgrading to Pandas latest version

These kinds of errors usually occur when you are working with Pandas inside your python IDE and you want open an excel file, for these kinds of errors first thing that you must do is by upgrading the panda’s version

All you need to do is to open up the terminal and type

%pip install --upgrade pandas

Hit enter and open the file again

This  will now solve your error, now you know how to fix xlrd error xlsx file not supported in excel

How to fix xlrd error xlsx file not supported in excel: Read excel method

If you have  tried the previous method but  it’s still not working for you then you might need to make a little change to your code by introducing the read excel function

This function can easily solve your problem of opening an excel file.

Write and type this code

import pandas as pd

df = pd.read_excel(

sample.xlsx”

This will open up your excel file and without any kind of error

How to fix xlrd error xlsx file not supported in excel: Using Openpyxl engine

If you are a programmer and still the above fixes haven’t worked for you ,then you might have to switch from Pandas to Openpyxl engine

Open up the terminal and write

%pip install openpyxl

The output of this code will be

Successfully installed openpyxl v3.0.9

Note: you may need to restart the kernel to use updated packages.

Again open the terminal and write

df = pd.read_excel(

sample.xlsm,

engine='openpyxl')

This will have your xlsx file open and now you know how to fix this kind of error

Did you learn about how to fix xlrd error xlsx file not supported in excel You can follow WPS academy to learn more features of Word documents, Excel Spreadsheets, and PowerPoint slides

You can also download WPS Office to edit word documents, Excel Spreadsheets, and PowerPoint free of cost. Download Now! And get an enjoyable working space.