Import data from data sources (Power Query) (2024)

You can import data into Excel from a wide variety of data sources and the sections that follow show you how.For more information on what to do with your data once it's imported, seeHow data journeys through Excel.

WindowsmacOS

You can create a query from an Excel table, named range, or dynamic array in the current workbook. If the selected data is a simple range, it’s converted to a table. Importing dynamic arrays requires a Microsoft 365 subscription. For more information on dynamic arrays, see Dynamic array formulas and spilled array behavior.

  1. Select any cell within your data range.

  2. Select Data> From Table/Range.

    This command is also available fromData> FromOther Sources >From Table/Range.

  3. If prompted, in the Create Table dialog box, you can select the Range Selection button to select a specific range to use as a data source.

    Import data from data sources (Power Query) (1)

  4. If the table or range of data has column headers, selectMy table has headers. The header cells are used to define the column names for the query.

  5. SelectOK.

For more information, seeImport from an Excel Table.

  1. Select Data > Get Data > From File > From Excel Workbook.

  2. In the Excel Browse dialog box, browse for or type a path to the file that you want to query.

  3. Select Open.

If your source workbook has named ranges, the name of the range will be available as a data set.

For more information about advanced connector options, see Excel Workbook.

The following procedure shows the basic steps. For more detailed coverage, seeImport or export text (.txt or .csv) files.

  1. SelectData >Get Data > From File > From Text/CSV.

  2. In the Comma-Separated Values Browse dialog box, browse for or type a path to the file that you want to query.

  3. SelectOpen.

Note:If you are importing data from a CSV file, Power Query will automatically detect column delimiters including column names and types. For example, if you imported the example CSV file below, Power Query automatically uses the first row as the column names and changes each column data type.

Example CSV file

Import data from data sources (Power Query) (2)

Power Query automatically changes each column data type:

  • Order ID changes to number

  • Order Date changes to date

  • Category remains text (the default column type)

  • Product Name remains text (the default column type)

  • Sales changes to number

For more information about advanced connector options, see Text/CSV.

The following procedure shows the basic steps of importing data. For more detailed coverage, seeImport XML data.

  1. Select Data>Get Data > From File > From XML.

  2. In the From XML Browse dialog box, browse for or type a file URL to import or link to a file.

  3. SelectOpen.

After the connection succeeds, use the Navigator pane to browse and preview the collections of items in the XML file in a tabular form.

For more information about advanced connector options, see XML.

  1. Select Data > Get Data > From File > From JSON.The Import Data dialog box appears.

  2. Locate the JSON file, and thenselect Open.

For more information about advanced connector options, see JSON.

Important When you try to import a PDF file, you may get the following PDF message:“This connector requires one or more additional components to be installed before it can be used.”The PDF connector requires .NET Framework 4.5 or higher to be installed on your computer.You can download the latest .NET Framework fromhere.

  1. SelectData > Get Data > From File > From PDF.

  2. Select your PDF file, and then click Open. The Navigator dialog box opens your PDF and displays available tables.

    Import data from data sources (Power Query) (3)

  3. Select the tables you want to import, then do one of the following:

    • To view the data directly in Excel, SelectLoad > Loador to see the Import dialog box, select Load > Load To.

    • To work with the data in Power Query first, selectTransform Data.

For more information about advanced connector options, see PDF.

You can import data from several files having a similar schema and format from a folder. Then, you can append the data into one table.

  1. Select Data > Get Data > From File> From Folder.

  2. In the Browse dialog box, locate the folder, and then select Open.

  3. For detailed steps, seeImport data from a folder with multiple files.

For more information about advanced connector options, see Folder.

You can import data from several files having a similar schema and format from a SharePoint library. Then, you can append the data into one table.

  1. Select Data > Get Data > From File> From SharePoint Folder.

  2. In the SharePoint Folder dialog box, enter the root URL for the SharePoint site not including any reference to a library, and then navigate to the library.

  3. For detailed steps, seeImport data from a folder with multiple files.

For more information about advanced connector options, see SharePoint folder.

  1. SelectData > Get Data > From Database > From SQL Server Database.

  2. In the Microsoft SQL Database dialog box, specify the SQL Server to connect to in the Server Name box. Optionally, you can specify a Database Name as well.

  3. If you want to import data using a native database query, specify your query in the SQL Statement box. For more information, see Import Data from Database using Native Database Query.

    Import data from data sources (Power Query) (4)
  4. Select OK.

  5. Select the authentication mode to connect to the SQL Server database.

    Import data from data sources (Power Query) (5)
    • WindowsThis is the default selection. Select this if you want to connect using Windows authentication.

    • DatabaseSelect this if you want to connect using SQL Server authentication. After you select this, specify a user name and password to connect to your SQL Server instance.

  6. By default, the Encrypt connection check box is selected to signify that Power Query connects to your database using an encrypted connection. If you do not want to connect using an encrypted connection, clear this check box, and then click Connect.

    If a connection to your SQL Server is not established using an encrypted connection, Power Query prompts you to connect using an unencrypted connection. Click OK in the message to connect using an unencrypted connection.

For more information about advanced connector options, see SQL Server database.

  1. Select Data > Get Data > From Database > From Microsoft Access Database.

  2. In the Import Data dialog box, browse for and locate the Access database file (.accdb).

  3. Select the file, and then select Open. The Navigator dialog box appears.

  4. Select the table or query in the left pane to preview the data in the right pane.

  5. If you have many tables and queries, use the Search box to locate an object or use the Display Options along with the Refresh button to filter the list.

  6. SelectLoad or Transform.

For more information about advanced connector options, see Access database.

Note When you use a workbook connected to a SQL Server Analysis Services database, you may need additional information to answer specific product questions, such as reference information about multidimensional expressions (MDX), or configuration procedures for an online analytical processing (OLAP) server.

  1. SelectData > Get External Data > From Database > From Analysis Services.The first page of the Data Connection Wizard appears. Its title is Connect to Database Server.

    Import data from data sources (Power Query) (6)
  2. In the Server namebox, enter the name of the OLAP database server.

    Tip:If you know the name of the offline cube file that you want to connect to, you can type the complete file path, file name, and extension.

  3. Under Log on credentials, do one of the following, then click Next:

    • To use your current Windows user name and password, click Use Windows Authentication.

    • To enter a database user name and password, click Use the following User Name and Password, and then type your user name and password in the corresponding User Name and Password boxes.

      Security Note

      • Use strong passwords that combine uppercase and lowercase letters, numbers, and symbols. Weak passwords don't mix these elements. For example, Y6dh!et5 is a strong password and House27 is a weak password. Passwords should contain 8 or more characters. A pass phrase that uses 14 or more characters is better.

      • It is critical that you remember your password. If you forget your password, Microsoft cannot retrieve it. Store the passwords that you write down in a secure place away from the information that they help protect.

  4. Select Nextto go to the second wizard screen. Its title is Select Database and Table.

    Import data from data sources (Power Query) (7)

    To connect to a specific cube file in the database, make sure that Connect to a specific cube or table is selected, and then select a cube from the list.

  5. In theSelect the database that contains the data you wantbox, select a database, and then clickNext.

  6. Click Next to go to the third wizard screen. Its titled Save Data Connection File and Finish.

    Import data from data sources (Power Query) (8)
  7. In theFile Namebox, revise the default file name as needed (optional).

  8. Click Browse to change the default file location of My Data Sources, or check for existing file names.

  9. In the Description, Friendly Name, and Search Keywords boxes, type a description of the file, a friendly name, and common search words (all are optional).

  10. To ensure that the connection file is used when the PivotTable is refreshed, click Always attempt to use this file to refresh this data.

    Selecting this check box ensures that updates to the connection file will always be used by all workbooks that use that connection file.

  11. You can specify how a PivotTable is accessed if the workbook is saved to Excel Services and is opened by using Excel Services.

    Note:The authentication setting is only used by Excel Services, and not by Microsoft Office Excel. If you want to ensure that the same data is accessed whether you open the workbook in Excel or Excel Services, make sure that the authentication setting in Excel is the same.

    Select Authentication Settings, and select one of the following options to log on to the data source:

    • Windows AuthenticationSelect this option to use the Windows username and password of the current user. This is the most secure method, but it can affect performance when there are many users.

    • SSOSelect this option to use Single Sign On, and then enter the appropriate identification string in theSSO IDtext box. A site administrator can configure a SharePoint site to use a Single Sign On database where a username and password can be stored. This method can be the most efficient when there are many users.

    • NoneSelect this option to save the username and password in the connection file.

      Important:Avoid saving logon information when connecting to data sources. This information may be stored as plain text, and a malicious user could access the information to compromise the security of the data source.

  12. Select OK.

  13. SelectFinish to close the Data Connection Wizard. TheImport Datadialog box appears.

    Import data from data sources (Power Query) (9)
  14. Decide how you want to import the data, and then select OK. For more information about using this dialog box, select the question mark (?).

You can create a dynamic connection between an Excel workbook and a SQL Server Analysis Services Online Analytical Processing (OLAP) database server, then refresh that connection whenever the data changes. You can connect to a specific offline cube file if it has been created on the database server. You can also import data into Excel as either a Table or a PivotTable report.

  1. SelectData > Get Data > From Database > From SQL Server Analysis Services Database (Import).

  2. Enter the Server name, and then selectOK.

    Note:You have the option of entering a specific database name, and you can also add an MDX or DAX query.

  3. In the Navigator pane select the database, and then select the cube or tables you want to connect.

  4. Click Load to load the selected table into a worksheet, or click Edit to perform additional data filters and transformations in the Power Query Editor before loading it.

For more information about advanced connector options, seeSQL Server Analysis Services.

Note:Before you can connect to an Oracle database using Power Query, please ensure all prerequisites are met.

  1. Select Data > Get Data > From Database > From Oracle Database.

  2. In the Oracle Database dialog box, in Server Name specify the Oracle Server to connect to. If a SID is required, this can be specified in the form of “ServerName/SID”.

  3. If you want to import data using native database query, specify your query in the SQL Statement box. For more information, see Import data from database using Native Database Query.

  4. SelectOK.

  5. If the Oracle server requires database user credentials:

    1. In the Access a Database dialog box, enter your username and password.

    2. Click Connect.

For more information about advanced connector options, see OracleDatabase.

Warning:

  • Before you can connect to an IBM DB2 database, you need the IBM DB2 Data Server Driver installed on your computer (minimum requirement is the IBM Data Server Driver Package (DS Driver)). Select the driver that matches your Power Query installation (32-bit or 64-bit).

  • There are known issues reported by IBM installing the IBM DB2 Data Server Driver on Windows 8. If you are using Windows 8 and want to connect to IBM DB2 using Power Query, you need to follow additional installation steps. Find more information about the IBM DB2 Data Server Driver on Windows 8.

  1. SelectData > Get Data > From Database > From IBM DB2 Database.

  2. In the IBM DB2 Database dialog box, in Server Name specify the IBM DB2 Database Server to connect to.

  3. If you want to import data using native database query, specify your query in the SQL Statement box. For more information, see Import data from a database using Native Database Query.

  4. Select OK.

  5. If the IBM DB2 server requires database user credentials:

    1. In the Access a Database dialog box, enter your username and password.

    2. Click Connect.

For more information about advanced connector options, see IBM DB2 database.

Note:If receive the message “This connector requires one or more additional components to be installed before it can be used.”, you need to download the appropriate ODBC Driver for MySQL to your Windows device from here. For more information, see MySQL Connectors.

  1. SelectData > Get Data > From Database > From MySQL Database.

  2. In the MySQL Database dialog box, in Server Name specify the MySQL Database Server to connect to.

  3. If you want to import data using native database query, specify your query in the SQL Statement box. For more information, see Import data from a database using Native Database Query.

  4. SelectOK.

  5. If the MySQL server requires database user credentials:

    1. In the Access a Database dialog box, enter your username and password.

    2. Click Connect.

For more information about advanced connector options, see MySQL database.

Note:Before you can connect to a PostgreSQL database in Power Query, you need the Ngpsql data provider for PostgreSQL installed on your computer. Select the driver that matches your Office version (32-bit or 64-bit). For more information, seeWhich version of Office am I using? . Also make sure you have the provider registered in the machine configuration that matches the most recent .NET version on your device.

  1. SelectData > Get Data > From Database > From PostgreSQL Database.

  2. In the PostgreSQL Database dialog box, specify the PostgreSQL Database Server you want to connect to in the Server Name section.

  3. If you want to import data using native database query, specify your query in the SQL Statement box. For more information, see Import data from a database using Native Database Query.

  4. Select OK.

  5. If the PostgreSQL server requires database user credentials:

    1. In the Access a Database dialog box, enter your username and password.

    2. Select Connect.

For more information about advanced connector options, see PostgreSQL.

Note:Before you can connect to an SAP SQL Anywhere database, you need the  SAP SQL Anywhere driver installed on your computer. Select the driver that matches your Excel installation (32-bit or 64-bit).

  1. SelectData > Get Data > From Database > From Sybase Database.

  2. In the Sybase Database dialog box, specify the Sybase Server to connect to in the Server Name box. Optionally, you can specify a Database Name as well.

  3. If you want to import data using a native database query, specify your query in the SQL Statement box. For more information, see Import data from a database using Native Database Query.

  4. SelectOK.

  5. By default, the Encrypt connection check box is selected so that Power Query connects to your database using a simple encrypted connection.

  6. SelectConnect.

For more information, seeSybase database.

Note:Before you can connect to a Teradata database, you need the .NET Data Provider for Teradata on your computer.

  1. SelectData > Get Data > From Database > From Teradata Database.

  2. In the Teradata Database dialog box, in Server Name specify the Teradata Server to connect to.

  3. If you want to import data using native database query, specify your query in the SQL Statement box. For more information, see Import data from a database using Native Database Query.

  4. Select OK.

  5. If the Teradata server requires database user credentials:

    1. In the Access a Database dialog box, enter your username and password.

    2. Click Save.

For more information, seeTerabase database.

Notes:

  • This feature is only available in Excel for Windows if you have Office 2019 or later, or aMicrosoft 365 subscription. If you are aMicrosoft 365 subscriber, make sure you have the latest version of Office.

  • Before you can connect to an SAP HANA database using Power Query, you need the SAP HANA ODBC Driver on your computer. Select the driver that matches your Power Query installation (32-bit or 64-bit).

  • You will need an SAP account to login to the website and download the drivers. If you are unsure, contact the SAP administrator in your organization.

To connect to an SAP HANA database:

  1. Click Data > New Query > From Database > From SAP HANA Database.

  2. In the SAP HANA Database dialog box, specify the server you want to connect to. The server name should follow the format ServerName:Port.

    Import data from data sources (Power Query) (10)
  3. Optionally, if you want to import data using native database query, SelectAdvanced options and in the SQL Statement box enter the query.

  4. SelectOK.

  5. If the SAP HANA server requires database user credentials, then in the Access an SAP HANA database dialog box, do the following:

    1. Click the Database tab, and enter your username and password.

    2. Click Connect.

For more information about advanced connector options, see SAP HANA database.

Azure SQL Database is a high-performing, fully managed, scalable relational database built for the cloud and used for mission-critical applications. For more information, seeWhat is Azure SQL?.

  1. Select Data > Get Data > From Azure > From Azure SQL Database.

  2. In the Microsoft SQL Database dialog box, specify the SQL Server to connect to in the Server Name box. Optionally, you can specify a Database Name as well.

  3. If you want to import data using a native database query, specify your query in the SQL Statement box. For more information, see Import Data from Database using Native Database Query.

    Import data from data sources (Power Query) (11)
  4. Select OK.

  5. Select the authentication mode to connect to the SQL Server database.

    Import data from data sources (Power Query) (12)
    • WindowsThis is the default selection. Select this if you want to connect using Windows authentication.

    • DatabaseSelect this if you want to connect using SQL Server authentication. After you select this, specify a user name and password to connect to your SQL Server instance.

  6. By default, the Encrypt connection check box is selected to signify that Power Query connects to your database using an encrypted connection. If you do not want to connect using an encrypted connection, clear this check box, and then click Connect.

    If a connection to your SQL Server is not established using an encrypted connection, Power Query prompts you to connect using an unencrypted connection. Click OK in the message to connect using an unencrypted connection.

For more information about advanced connector options, see Azure SQL database.

Azure Synapse Analytics combines big data tools and relational queries by using Apache Spark to connect to Azure data services and the Power Platform. You can load millions of rows in no time. Then, you can work with tabular data by using familiar SQL syntax for queries. For more information, see What is Azure Synapse Analytics (docs.com).

  1. Select Data > Get Data > From Azure > From Azure Synapse Analytics.

  2. In the Microsoft SQL Database dialog box, specify the SQL Server to connect to in the Server Name box. Optionally, you can specify a Database Name as well.

  3. If you want to import data using a native database query, specify your query in the SQL Statement box. For more information, see Import Data from Database using Native Database Query.

    Import data from data sources (Power Query) (13)
  4. Select OK.

  5. Select the authentication mode to connect to the SQL Server database.

    Import data from data sources (Power Query) (14)
    • WindowsThis is the default selection. Select this if you want to connect using Windows authentication.

    • DatabaseSelect this if you want to connect using SQL Server authentication. After you select this, specify a user name and password to connect to your SQL Server instance.

  6. By default, the Encrypt connection check box is selected to signify that Power Query connects to your database using an encrypted connection. If you do not want to connect using an encrypted connection, clear this check box, and then click Connect.

    If a connection to your SQL Server is not established using an encrypted connection, Power Query prompts you to connect using an unencrypted connection. Click OK in the message to connect using an unencrypted connection.

For more information about advanced connector options, see Azure Synapse Analytics.

Azure HDInsight is used for big data analysis when you need to process large amounts of data. It supports data warehousing and machine learning; you can think of it as a data flow engine. For more information, see What is Azure HDInsight?.

  1. Select Data > Get Data > From Azure > From Azure HDInsight (HDFS).

  2. Enter the Account name or URL of the Microsoft Azure Blob Storage account associated with your HDInsight cluster, and then selectOK.

  3. In the Access Microsoft Azure HDInsight dialog box, enter your Account Key, and click Connect.

  4. Select your cluster in the Navigator dialog, and then find and select a content file.

  5. SelectLoad to load the selected table, or Edit to perform additional data filters and transformations before loading it.

For more information about advanced connector options, seeAzure HDInsight.

Microsoft Azure Blob Storage is a service for storing large amounts of unstructured data, like images, videos, audio, and documents, which can be accessed from anywhere in the world via HTTP or HTTPS. For more information about Azure Blob Storage service, see How to Use Blob Storage.

  1. Select Data > Get Data > From Azure > From Azure Blob Storage.

  2. In the Microsoft Azure Blob Storage dialog box, enter your Microsoft Azure storage account name or URL, and then selectOK.

  3. If you are connecting to the Blob storage service for the first time, you will be prompted to enter and save the storage access key. In the Access Microsoft Azure Blob Storage dialog box, enter your storage access key in the Account Key box, and click Save.

    Note:If you need to retrieve your storage access key, browse to the Microsoft Azure Portal, select your storage account, and then select the Manage Access Key icon on the bottom of the page. Select the copy icon to the right of the primary key, and then paste the value in the Account Key box.

  4. The Query Editor lists all the available containers in your Microsoft Azure Blob Storage. In the Navigator, select a container from where you want to import data, and then selectApply & Close.

For more information, seeAzure Blob Storage.

The Azure Storage provides storage services for a variety of data objects. The Table storage component targets NoSQL data stored as key/attribute pairs. For more information, see Introduction to Table storage.

  1. Select Data > Get Data > From Azure > From Azure Synapse Analytics.

  2. Enter the Account name or URL of the Microsoft Azure Table Storage account, and then select OK.

For more information about advanced connector options, seeAzure Table Storage.

Important:Azure Data Lake Storage Gen 1 is being retired. For more information, see Action required: Switch to Azure Data Lake Storage Gen2 by 29 February 2024.

  1. Select Data > Get Data > From Azure > From Azure Data Lake Storage.

  2. Enter the Account name or URL of the Microsoft Azure Data Lake Storage account, and then select OK.

    For example: swebhdfs://contoso.azuredatalake.net/

  3. Optionally, enter a value in the Page Size in Bytes box.

For more information, seeAzure Data Lake Storage.

Azure Data Lake Storage Gen 2combines different data warehouses into a single, stored environment. You can use a new generation of query tools to explore and analyze data, working with petabytes of data. For more information, see Azure Data Lake Storage.

  1. In the Azure Data Lake Storage Gen2 dialog box, provide the account URL.URLs for Data Lake Storage Gen2 have the following pattern:

    https://<accountname>.dfs.core.windows.net/<container>/<subfolder>
    For example, https://contosoadlscdm.dfs.core.windows.net/

  2. Select whether you want to use the File System View or the Common Data Model (CDM) Folder View.

  3. Select OK.

  4. You may need to choose an authentication method.

    For example, if you select the Organizational account method, select Sign in to sign into your storage account. You'll be redirected to your organization's sign-in page. Follow the prompts to sign into the account. After you've successfully signed in, select Connect.

  5. In the Navigator dialog box verify the information, and then select either Transform Data to transform the data in Power Query or Load to load the data.

For more information, seeAzure Data Lake Storage.

Azure Data Explorer is a fast and highly scalable data exploration service for log and telemetry data. It can handle large volumes of diverse data from any data source, such as websites, applications, IoT devices, and more. For more information, see What is Azure Data Explorer.

  1. Select Data > Get Data > From Azure > From Azure Data Explorer.

  2. In the Azure Data Explorer (Kusto) dialog box, enter appropriate values.

    Each prompt provides helpful examples to walk you through the process.

  3. Select OK.

You can import Datasets from your organization with appropriate permission by selecting them from the Power BI Datasets pane, and thencreatinga PivotTable in a new worksheet.

  1. Select Data > Get Data > FromPower BI (<Tenant name>). The Power BI Datasets pane appears.<Tenant name> varies depending on your organization, for example, Power BI (Contoso).

  2. If many Datasets are available, use the Search box. Select the arrow next to the box to displaykeyword filters for versions and environments to target your search.

  3. Select a Dataset and create a PivotTable in a new worksheet. For more information, seeOverview of PivotTables and PivotCharts.

For more information on Power BI, seeCreate a PivotTable from Power BI datasetsandData Management Experience in Power BI for Office 365 Help.

A dataflow is a data preparation technology that enables ingesting, transforming, and loading data into Microsoft Dataverse environments, Power BI workspaces, or Azure Data Lake. You can trigger dataflows to run either on demand or automatically on a scheduleso that data is always kept up to date.

  1. Select Data > Get Data > From Power Platform > From Dataflows.

  2. If prompted, enter the required credentials, or sign in as a different user. The Navigator pane appears.

  3. Select the dataflow in the left pane to preview it in the right pane.

  4. Do one of the following:

    • To add the datato a worksheet, select Load.

    • To add the datato the Power Query Editor, select Transform Data.

For more information, see An overview of dataflows across Microsoft Power Platform.

Use Dataverse to securely store and manage data in the cloud. You can create or import custom tables specific to your organization, populate them with data by using Power Query, and then use Power Apps or Microsoft Access to build rich business applications.

  1. Select Data > Get Data > From Power Platform > From Dataverse.

  2. If prompted, enter the required credentials, or sign in as a different user. The Navigator pane appears.

  3. Select the data in the left pane to preview it in the right pane.

  4. Do one of the following:

    • To add the data to a worksheet, select Load.

    • To add the datato the Power Query Editor, select Transform Data.

For more information, see What is Microsoft Dataverse.

  1. Select Data > Get Data > From Online Services> From SharePoint Online List.

  2. In the SharePoint Folder dialog box, enter the root URL for the SharePoint site not including any reference to a library, and then navigate to the library.

  3. Select the 2.0Beta SharePoint implementation, which enablesAdvanced options, so you can select aView mode:

    AllRetrieves all columns from a SharePoint List.
    Default Retrieves the columns set in the Default Viewof a SharePoint List.

  4. As an alternative to 2.0 Beta, you can select1.0, which corresponds to the earlier version of SharePoint.

For more information about advanced connector options, see SharePoint Online list.

  1. Select Data > Get Data > From Online Services from SharePoint Online List.

  2. In the Microsoft Exchange dialog box enter your email address in the form of <alias>@<organization>.com

  3. If you have many objects, use the Search box to locate an object or use he Display Options along with the Refresh button to filter the list.

  4. Select or clear the Skip files with errors checkbox at the bottom of the dialog box.

  5. Select the table you want: Calendar, Mail, Meeting Requests, People, and Tasks.

  6. Do one of the following:

  • To create a query, and then load to a worksheet, select Load > Load.

  • To create a query, and then display the Import Data dialog box, select Load > Load To.

  • To create a query, and then launch the Power Query Editor, select Transform Data.

For more information about advanced connector options, seeMicrosoft Exchange Online.

  1. Select the Environment you want to connect to.

  2. In the menu, select the Settings icon > Advanced customizations > Developer resources.

  3. Copy the Instance Web API value.

    Notes:

    • The url format will be something likehttps://<tenant>.crm.dynamics.com/api/data/v9.0.

    • The exact format of the URL you will use to connect depends on your region and the version of CDS for Apps you're using. For more information see:Web API URL and versions.

  4. Select Data > Get Data > From Online Services > From Dynamics 365 (online).

  5. In the dialog box, with the Basic option selected, enter the Web API URL for your CDS for Apps connection, and click OK.

    • If you select the Advanced option, you can append certain additional parameters to the query to control what data is returned. For more information see:Query Data using the Web API.

  6. Select Organization account.

    • If you aren't signed in using the Microsoft Work or School account you use to access Dataverse for Apps, selectSign in and enter the account username and password.

  7. SelectConnect.

  8. Within the Navigator dialog, select the data you want to retrieve.

  9. Verify the data is correct, and then select Loador Edit to open the Power Query Editor.

  1. Select Data > Get Data > From Online Services > From Salesforce Objects. The Salesforce Objects dialog box appears.

  2. Select either Production or Custom. If you select Custom, enter the URL of a custom instance.

  3. Select or clear Include relationships column.

  4. Select OK.

For more information about advanced connector options, see Salesforce Objects.

Because Salesforce Reports has API limits retrieving only the first 2,000 rows for each report, consider using the Salesforce Objects connector to work around this limitation if needed.

  1. Select Data > Get Data > From Online Services > From Salesforce Reports. The Salesforce Reports dialog box appears.

  2. Select either Production or Custom. If you select Custom, enter the URL of a custom instance.

  3. Select or clear Include relationships column.

  4. Select OK.

For more information about advanced connector options, see Salesforce Reports.

Make sure you have the latest version of theAdobe Analytics connector. For more information, see Connect to Adobe Analytics in Power BI Desktop.

  1. Select Data > Get Data > From Online Services > From Adobe Analytics.

  2. Select Continue. The Adobe Account dialog box appears.

  3. Sign in with you Adobe Analytics Organizational account, and then select Connect.

For more information about advanced connector options, see Adobe Analytics.

For more information, see From Table/Range.

Important:

  • When youtry to import a data from the web, you may get the following message:  “This connector requires one or more additional components to be installed before it can be used.” The Web connector requires WebView 2 Framework to be installed on your computer.

  • You can download it from here.

  • This update does not apply for volume licensing versions (e.g. Commercial Perpetual).

Procedure

  1. Select Data>New Query > From Other Sources > From Web.

  2. In the From Web dialog box, enter a web page URL, then click OK.

    Import data from data sources (Power Query) (15)

    In this case, we're using: http://en.wikipedia.org/wiki/UEFA_European_Football_Championship.

    If the web page requires user credentials:

    • Select Advanced, and thenIn the Access Web dialog box, enter your credentials.

    • SelectSave.

  3. SelectOK.

  4. In theNavigator pane, do the following:

    Select Table View, such asResults.

    Import data from data sources (Power Query) (16)

    SelectWeb View to seethe table as a web page.

    Import data from data sources (Power Query) (17)
  5. Select Loadto load the data into a worksheet.

For more information about advanced connector options, see Web.

Microsoft Query has been around a long time and is still popular. In many ways, it's a progenitor of Power Query.For more information, seeUse Microsoft Query to retrieve external data.

  1. Select Data> Get Data > From Other Sources > From SharePoint List.

  2. In the Microsoft SharePoint Lists dialog box, enter the URL for a SharePoint site.

    Note:When connecting to a SharePoint list, enter the site URL instead of the list URL. In the Access SharePoint dialog box, select the most general URL to authenticate against the site correctly. By default, the most general URL is selected.

  3. Select OK.

  4. In the Access SharePoint dialog box, select a credentials option:

    • Select Anonymous if the SharePoint Server does not require any credentials.

      Import data from data sources (Power Query) (18)
    • Select Windows if the SharePoint Server requires your Windows credentials.

    • Select Organizational account if the SharePoint Server requires organizational account credentials.

  5. Select Connect.

For more information about advanced connector options, see SharePoint list.

  1. SelectData > Get Data > From Other Sources > From OData Feed.

  2. In the OData Feed dialog box, enter the URL for an OData feed.

  3. Select OK.

  4. If the OData feed requires user credentials, in the Access an OData feed dialog box:

    1. Select Windows if the OData feed requires Windows Authentication.

    2. Select Basic if the OData feed requires your username and password.

    3. Select Marketplace key if the OData feed requires a Marketplace account key. You can select the Get your Marketplace Account Key to subscribe to Microsoft Azure Marketplace OData feeds. You can also Sign up for Microsoft Azure Marketplace from the Access an OData Feed dialog box.

    4. Click Organizational account if the OData feed requires federated access credentials. For Windows Live ID, log into your account.

    5. Select Save.

Note:Importing to an OData feed supports the JSON light data service format.

For more information about advanced connector options, see OData feed.

Hadoop Distributed File System (HDFS) is designed to store terabytes and even petabytes of data. HDFS connects computer nodes within clusters over which data files are distributed and you can access these data files as one seamless file stream.

  1. Select Data > Get Data > From Other Sources > From Hadoop File (HDFS).

  2. Enter the name of the server in the Server box, and then select OK.

For more information about advanced connector options, see Hadoop File (HDFS).

  1. Select Data > Get Data > From Other Sources>From Active Directory.

  2. Enter your domain in the Active Directory dialog box.

  3. In the Active Directory Domain dialog box for your domain, selectUse my current credentials, or selectUse alternate credentialsand then enter your Username and Password.

  4. SelectConnect.

  5. After the connection succeeds, use the Navigator pane to browse all the domains available within your Active Directory, and then drill down into Active Directory information including Users, Accounts, and Computers.

For more information about advanced connector options, seeActive Directory.

  1. SelectData > Get Data > From Other Sources > From Microsoft Exchange.

  2. In the Access an Exchange Server dialog box, enter your Email Address and Password.

  3. SelectSave.

  4. In the Microsoft Exchange Autodiscover Service dialog box, select Allow to allow the Exchange Service to trust your credentials.

For more information about advanced connector options, seeMicrosoft Exchange.

  1. SelectData > Get Data > From Other Sources > From ODBC.

  2. In the From ODBC dialog box, if displayed, select your Data Source Name (DSN).

  3. Enter your connection string, and then selectOK.

  4. In the next dialog box, select from Default or Custom, Windows, or Database connection options, enter your credentials, and then selectConnect.

  5. In the Navigator pane, select the tables or queries that you want to connect to, then select Load or Edit.

For more information about advanced connector options, see ODBC data source.

  1. SelectData > Get Data > From Other Sources > From OLEDB.

  2. In the From OLE DB dialog box, enter your connection string, and then selectOK.

  3. In the OLEDB Provider dialog, select from the Default or Custom, Windows, or Database connection options, enter the appropriate credentials, and then selectConnect.

  4. In the Navigator dialog box, select the database, and tables or queries you want to connect to, and then selectLoad or Edit.

For more information about advanced connector options, seeOLE DB.

Important: Retirement of Facebook data connector noticeImport and refresh data from Facebook in Excel will stop working in April, 2020. You will still be able to use the Facebook Power Query (Get & Transform) connector until then, but starting in April, 2020, you will be unable to connect to Facebook and will receive an error message. We recommend revising or removing any existing Power Query (Get & Transform)queries that use the Facebook connector as soon as possible to avoid unexpected results.

Note:If this is the first time you've connected to Facebook, you will be asked to provide credentials. Sign in using your Facebook account, and allow access to the Power Query application. You can turn off future prompts by clicking the Don't warn me again for this connector option.

  1. On the Data tab, click Get Data > From Online Services > From Facebook. If you don't see the Get Data button, click New Query > From Other Sources > From Facebook.

  2. In the Facebook dialog box, connect to Facebook using “Me”, your Username, or Object ID.

    Note:Your Facebook username is different from your login email.

  3. Select a category to connect to from the Connection drop-down list. For example, select Friends to give you access to all information available in your Facebook Friends category.

  4. Click OK.

  5. If necessary, click Sign in from the Access Facebook dialog, then enter your Facebook email or phone number, and password. You can check the option to remain logged in. Once signed in, click Connect.

  6. After the connection succeeds, you will be able to preview a table containing information about the selected category. For instance, if you select the Friends category, Power Query renders a table containing your Facebook friends by name.

  7. Click Load or Edit.

You can create a blank query. You might wantto enter data to try out some commands, or you can select the source data from Power Query:

  • To change a setting such as credentials or privacy,select Home> Data Source Settings. For more information, see Manage data source settings and permissions.

  • To import an external data source, selectHome> New Source. This command is similar to the Get Data command on the Data tabof the Excel ribbon.

  • To import a recent source, selectHome> Recent Sources.This command is similar to the Recent Sources command on the Data tabof the Excel ribbon.

When you merge two external data sources, you join two queries that create a relationship between two tables.

For more information, see Merge queries (Power Query),Learn to combine multiple data sources (Power Query), andMerge queries overview.

When you append two or more queries, the data is added to a query based on the names of the column headers in both tables. If the queries don’t have matching columns, null values are added to the unmatched column. The queries are appended in the order in which they're selected.

For more information, see Append queries (Power Query) and Append queries.

If you are a developer, there are several approaches within Excel that you can take to import data:

  • You can use Visual Basic for Applications to gain access to an external data source. Depending on the data source, you can use either ActiveX Data Objects or Data Access Objects to retrieve the data. You can also define a connection string in your code that specifies the connection information. Using a connection string is useful, for example, when you want to avoid requiring system administrators or users to first create a connection file, or to simplify the installation of your application.

  • If you import data from an SQL Server database, consider using SQL Native Client, which is a standalone data access Application Programming Interface (API) that is used for both OLE DB and ODBC. It combines the SQL OLE DB Provider and the SQL ODBC Driver into one native, dynamic link library (DLL), while also providing new functionality that is separate and distinct from the Microsoft Data Access Components (MDAC). You can use SQL Native Client to create new applications or enhance existing applications that can take advantage of newer SQL Server features, such as Multiple Active Result Sets (MARS), User-Defined Types (UDT), and XML data type support.

  • The RTD function retrieves real-time data from a program that supports COM automation. The RTD COM automation add-in must be created and registered on a local computer.

  • The SQL.REQUEST function connects with an external data source and runs a query from a worksheet. The SQL.REQUEST function then returns the result as an array without the need for macro programming. If this function is not available, you must install the Microsoft Excel ODBC add-in program (XLODBC.XLA). You can install the add-in from Office.com.

For more information about creating Visual Basic for Applications, see Visual Basic Help.

  1. Select Data > Get Data (Power Query).

  2. In the Choose data source dialog box, select Excel workbook.

  3. Select Browse to locate the file you want to connect as the data source.

  4. In the File picker dialog box, select the file, review the file details, and then select Get Data and Next.

  5. On the left, select the data you want to import, and then on the right, confirm the selection in data preview.

  6. At the bottom right, select Load.

  1. Select Data > Get Data (Power Query).

  2. In the Choose data source dialog box, select Text/CSV.

  3. Select Browse to locate the file you want to connect as the data source.

  4. In the File picker dialog box, select the file, review the file details, and then select Get Data and Next.

  5. Confirm the file origin and delimiter selection in data preview.

  6. At the bottom right, select Load.

  1. Select Data > Get Data (Power Query).

  2. In the Choose data source dialog box, select XML.

  3. Select Browse to locate the file you want to connect as the data source.

  4. In the File picker dialog box, select the file, review the file details, and then select Get Data and Next.

  5. On the left, select the data you want to import, and then on the right, confirm the selection in data preview.

  6. At the bottom right, select Load.

  1. Select Data > Get Data (Power Query).

  2. In the Choose data source dialog box, select JASON.

  3. Select Browse to locate the file you want to connect as the data source.

  4. In the File picker dialog box, select the file, review the file details, and then select Get Data and Next.

  5. At the bottom right, select Close &Load.

  1. Select Data > Get Data (Power Query).

  2. In the Choose data source dialog box, select SQL Server database.

  3. Under Connection settings, enter the name of the server.

  4. Under Connection credentials, enter the username and password, decide whether to use an encrypted connection, and then select Next.

  5. On the left, select the data you want to import, and then on the right, confirm the selection in data preview.

  6. At the bottom right, select Load.

  1. Select Data > Get Data (Power Query).

  2. In the Choose data source dialog box, select SharePoint Online list.

  3. In the Connect to data source dialog box, enter the root URL for the SharePoint site not including any reference to a library, and then sign in to your organizational account.

  4. Select the 2.0 SharePoint implementation, which enables Advanced options, so you can select a View mode:

    • All which retrieves all columns from a SharePoint List.

    • Default which retrieves the columns set in the Default View of a SharePoint List.

    Note As an alternative to 2.0, you can select 1.0, which corresponds to the earlier version of SharePoint.

  5. SelectNext.

  6. On the left, select the data you want to import, and then on the right, confirm the selection in data preview.

  7. At the bottom right, select Load.

  1. Select Data > Get Data (Power Query).

  2. In the Choose data source dialog box, select OData.

  3. In the OData Feed dialog box, enter the URL for the OData feed.

  4. If the OData feed requires user credentials, in the Connection credentials dialog box under Authentication kind:

    • Select Basic if the OData feed requires your username and password.

    • Select Organizational account if the OData feed requires federated access credentials, and select Sign in.

  5. Select Next.

  1. Select Data > Get Data (Power Query).

  2. In the Choose data source dialog box, select Blank table.

  3. Enter the desired data to the cells of the table. You can also rename the table under Name at the bottom.

  4. Select Next.

  5. After editing the query, on the top-right select Close & load.

  1. Select Data > Get Data (Power Query).

  2. In the Choose data source dialog box, select Blank query.

  3. Enter the desired source and commands and then select Next.

  4. After editing the query, on the top-rightselect Close & load.

See Also

Power Query for Excel Help

Import data from database using native database query

Use multiple tables to create a PivotTable

Import data from a database in Excel for Mac

Getting data

Import data from data sources (Power Query) (2024)

FAQs

How do you import data through Power Query? ›

In Excel, select Data > Queries & Connections, and then select the Queries tab. In the list of queries, locate the query, right click the query, and then select Load To. The Import Data dialog box appears. Decide how you want to import the data, and then select OK.

How to connect to data source in Power Query? ›

Go to Data > Data sources. Select Add a data source. Select Microsoft Power Query. Provide a Name and an optional Description for the data source, and select Next.

How do I combine data sources in Power Query? ›

Select a cell in the query, and then select Query > Merge. In the Merge dialog box, select Products as the primary table, and select Total Sales as the secondary or related query to merge.

How do I import a CSV file into Excel using Power Query? ›

Import a text file by connecting to it (Power Query)
  1. On the Data tab, in the Get & Transform Data group, click From Text/CSV.
  2. In the Import Data dialog box, locate and double-click the text file that you want to import, and click Import.
  3. In the preview dialog box, you have several options:

How do I load data from a folder in Power Query? ›

Connect to a folder from Power Query Desktop

Select the Folder option in the connector selection. Enter the path to the folder you want to load, or select Browse to browse to the folder you want to load. Then select OK.

How do I add a column from data source in Power Query? ›

Add a column from all columns
  1. To open a query, locate one previously loaded from the Power Query Editor, select a cell in the data, and then select Query > Edit. ...
  2. Select Add Column > Column From Examples > From All Columns. ...
  3. Enter a sample value for the new column data you want, and then press Ctrl + Enter. ...
  4. Select OK.

How do you paste data into Power Query? ›

Copy / Paste

From the dropdown menu, select the Copy option. The query and its definition are added to your clipboard. To paste the query from your clipboard, go to the queries pane and right-click on any empty space in it. From the menu, select Paste.

How do you combine data sources? ›

The easiest way of combining data manually is simply copying it from different data sources and inserting it into the new destination. For smaller datasets, manual entry could also be a feasible option.

How do you join data in Power Query? ›

Select Home > Merge Queries. The default action is to do an inline merge. To do an intermediate merge, select the arrow next to the command, and then select Merge Queries as New. The Merge dialog box appears.

How do you consolidate data in Power Query? ›

Combine and Transform Data To combine all the files with a query, and then launch the Power Query Editor, select Combine > Combine and Transform Data. Combine and Load To display the Sample file dialog box, create a query, and then load to worksheet, select Combine > Combine and Load.

How to use Power Query to import data? ›

Follow the steps to import a text file using Power query:
  1. Click on the Data tab --> Text/CSV File.
  2. Once we have selected the “Text/CSV file” option, an 'Import data' dialog box is opened.
  3. Select the desired text file and click on Import.
  4. A dialog box is opened, which shows a preview of the data contained.
Feb 16, 2024

How do I retrieve data from Power Query? ›

To get data in Data Factory:
  1. On the left side of Data Factory, select Workspaces (but not My Workspace).
  2. From your Data Factory workspace, select New > Dataflow Gen2 (Preview) to create a new dataflow.
  3. In Power Query, either select Get data in the ribbon or select Get data from another source in the current view.
Mar 12, 2024

How do you load data into a data model? ›

Add existing, unrelated data to a Data Model

It can be any range of data, but data formatted as an Excel table is best. Use one of these approaches to add your data: Click Power Pivot > Add to Data Model. Click Insert > PivotTable, and then check Add this data to the Data Model in the Create PivotTable dialog box.

How do I add data to an existing Power Query? ›

Append queries
  1. To open a query, locate one previously loaded from the Power Query Editor, select a cell in the data, and then select Query > Edit. For more information see Create, load, or edit a query in Excel.
  2. Select Home > Append Queries. ...
  3. Decide the number of tables you want to append: ...
  4. Select OK.

How do you reload data in Power Query? ›

Refresh a query (Power Query Editor)
  1. Click Get & Transform > Show Queries.
  2. In the Workbook Queries pane, select the query you want to refresh.
  3. In the Power Query Editor ribbon, click Home > Query > Refresh preview.

Top Articles
International travel medical insurance and travel protection
Why your reservation request may have been declined by the Host
Part time Jobs in El Paso; Texas that pay $15, $25, $30, $40, $50, $60 an hour online
Best Big Jumpshot 2K23
The 10 Best Restaurants In Freiburg Germany
Wmu Course Offerings
Shorthand: The Write Way to Speed Up Communication
Polyhaven Hdri
Is Sportsurge Safe and Legal in 2024? Any Alternatives?
Dr Klabzuba Okc
Does Publix Have Sephora Gift Cards
Zoebaby222
Cranberry sauce, canned, sweetened, 1 slice (1/2" thick, approx 8 slices per can) - Health Encyclopedia
อพาร์ทเมนต์ 2 ห้องนอนในเกาะโคเปนเฮเกน
Shooting Games Multiplayer Unblocked
Nebraska Furniture Tables
Munich residents spend the most online for food
Craftology East Peoria Il
Carolina Aguilar Facebook
Roster Resource Orioles
Promiseb Discontinued
Mail.zsthost Change Password
Egizi Funeral Home Turnersville Nj
The Listings Project New York
Myql Loan Login
Is Holly Warlick Married To Susan Patton
Dr Seuss Star Bellied Sneetches Pdf
Downtown Dispensary Promo Code
Uncovering the Enigmatic Trish Stratus: From Net Worth to Personal Life
Play It Again Sports Forsyth Photos
What is Software Defined Networking (SDN)? - GeeksforGeeks
Elanco Rebates.com 2022
Japanese Pokémon Cards vs English Pokémon Cards
Nicole Wallace Mother Of Pearl Necklace
AsROck Q1900B ITX und Ramverträglichkeit
Craigslist Mount Pocono
Lyca Shop Near Me
Td Ameritrade Learning Center
Flags Half Staff Today Wisconsin
Suffix With Pent Crossword Clue
Samantha Lyne Wikipedia
Gotrax Scooter Error Code E2
How I Passed the AZ-900 Microsoft Azure Fundamentals Exam
Celsius Claims Agent
Senior Houses For Sale Near Me
Gabrielle Abbate Obituary
Craigslist Pet Phoenix
Worland Wy Directions
Www.homedepot .Com
Germany’s intensely private and immensely wealthy Reimann family
Erica Mena Net Worth Forbes
What Is The Gcf Of 44J5K4 And 121J2K6
Latest Posts
Article information

Author: Melvina Ondricka

Last Updated:

Views: 6066

Rating: 4.8 / 5 (48 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Melvina Ondricka

Birthday: 2000-12-23

Address: Suite 382 139 Shaniqua Locks, Paulaborough, UT 90498

Phone: +636383657021

Job: Dynamic Government Specialist

Hobby: Kite flying, Watching movies, Knitting, Model building, Reading, Wood carving, Paintball

Introduction: My name is Melvina Ondricka, I am a helpful, fancy, friendly, innocent, outstanding, courageous, thoughtful person who loves writing and wants to share my knowledge and understanding with you.