Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Has anyone successfully written a Python Script run in Power Bi that replaces steps in Power Query to import a sharepoint spreadsheet?
I've already tried 2 different scripts
# 'dataset' holds the input data for this script
import pandas as pd
#pd.read_excel('https://orgname.sharepoint.com/teams/MyTeam/Shared Documents/General/Security/Metrics/myspreadsheet.xlsx', sheet_name=[8]) # load ws6
and
# 'dataset' holds the input data for this script
import pandas as pd
# load example
df1 = pd.read_excel('https://orgname.sharepoint.com/teams/MyTeam/Shared Documents/General/Security/Metrics/myspreadsheet.xlsx',
# get sheets 2 through 8; rows 1-2 are the headers
sheet_name=[2, 3, 4, 5, 6, 7, 8], header=[1, 2])
Solved! Go to Solution.
Looks like you need to download the file before you can open it
Looks like you need to download the file before you can open it
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
80 | |
60 | |
35 | |
35 |
User | Count |
---|---|
100 | |
62 | |
56 | |
47 | |
41 |