Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Ismail94
Frequent Visitor

Trying to import xlsx file via python script to POWER BI but it shows Error

Hi!  I am trying to import xlsx file via python script but it shows

 "Details: "ADO.NET: Python script error.
<pi>ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.
</pi>""

 

You may say why i am not importing directly to power bi, the issue is i have a large dataset which i am trying to make pivot table by using lookup formula of python. To do the look up i need to import xlsx file and then squeeze it via pivot_table. 

You also may say that i need to only install xlrd library to python but this one also already installed and when i write a script "import xlrd" it shows :

Details: "ADO.NET: Python script error.
<pi>ModuleNotFoundError: No module named 'xlrd'
</pi>"

 

Could someone help with this issue please, I would really appreciate it in advance!

2 REPLIES 2
amitchandak
Super User
Super User

@Ismail94 , it seems it not installed or not the proper version

 

use as suggested

pip install xlrd

 

or

 

conda install xlrd

I have already installed 2.0.1 version of xlrd but not working

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.