top of page

You are learning Power Query in MS Excel

How to connect to cloud-based data sources (SharePoint, OneDrive) with Power Query?

Connecting to cloud-based data sources like SharePoint and OneDrive using Power Query allows you to import and work with data directly from these platforms within Excel or Power BI. Here’s how you can connect to these data sources:

Connecting to SharePoint Online

1. Connect via Power Query in Excel

1. Open Excel:
- Go to the `Data` tab and select `Get Data` > `From Online Services` > `From SharePoint Online List`.

2. Enter SharePoint Site URL:
- Enter the URL of your SharePoint site in the `From SharePoint Online List` dialog box and click `OK`.

3. Authenticate:
- Power Query prompts you to authenticate. Enter your credentials (username and password) and click `Connect`.

4. Select Data:
- Select the lists or libraries from SharePoint that you want to import into Excel. You can preview the data and apply transformations if needed.

5. Load Data:
- After selecting and transforming the data, click `Load` to import the data into Excel.

2. Connect via Power BI

1. Open Power BI:
- In Power BI Desktop, go to `Home` > `Get Data` > `More...`.

2. Select SharePoint Online:
- In the `Get Data` window, search for and select `SharePoint Online List`, then click `Connect`.

3. Enter SharePoint Site URL:
- Enter the URL of your SharePoint site and click `OK`.

4. Authenticate:
- Enter your credentials (username and password) to authenticate and access SharePoint data.

5. Select Data:
- Choose the lists or libraries from SharePoint that you want to import into Power BI. Preview and transform data as needed.

6. Load Data:
- Click `Load` to load the data into Power BI for analysis and visualization.

Connecting to OneDrive

1. Connect via Power Query in Excel

1. Open Excel:
- Go to the `Data` tab and select `Get Data` > `From File` > `From OneDrive`.

2. Sign in to OneDrive:
- Sign in with your Microsoft account credentials associated with OneDrive.

3. Select File:
- Navigate to the folder containing the file you want to import and select it.

4. Load Data:
- Select the table or data from the file you want to import and click `Load` to import it into Excel.

2. Connect via Power BI

1. Open Power BI:
- In Power BI Desktop, go to `Home` > `Get Data` > `More...`.

2. Select OneDrive:
- In the `Get Data` window, search for and select `OneDrive`, then click `Connect`.

3. Sign in to OneDrive:
- Sign in with your Microsoft account credentials.

4. Select File:
- Navigate to the folder containing the file you want to import and select it.

5. Load Data:
- Choose the table or data from the file to import into Power BI. Click `Load` to load the data for analysis.

Notes:

- Authentication: Ensure you have the necessary permissions and credentials to access SharePoint sites or OneDrive files.
- Data Refresh: Configure data refresh settings in Excel or Power BI to keep data up to date automatically from cloud-based sources.
- Query Editor: Use the Power Query Editor to apply transformations, filter data, and clean up imported data before loading into your workbook or report.

By following these steps, you can easily connect to and import data from SharePoint Online and OneDrive into Excel or Power BI using Power Query, enabling seamless integration and analysis of cloud-based data.

bottom of page