Use Excel's Get & Transform (Power Query) experience to connect to an Excel workbook, a text file (.txt), or a Comma Separated Values (.csv) file just like you would connect to any other data source. The Power Query editor gives you a great deal of flexibility with how you get and transform your data.
In this article
Connect to an Excel or CSV file
Additional Steps
- In the Excel Browse or Comma-Separated Values Browse dialog box, browse for or type a path to the file that you want to query.
- Click Open.Important: If you are importing data from a CSV file, Power Query will automatically detect column delimiters including column names and types. See importing data from a CSV file.
Import data from a named range
If your source workbook has named ranges, the name of the range will be available as a data set.
Importing data from a CSV file
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
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
In the Query Editor, Power Query automatically applies a FirstRowAsHeader step and ChangeType step. These automatic actions are equivalent to manually promoting a row and manually changing each column type.
Formula Examples
Microsoft Access Database Engine (Microsoft.ACE.OLEDB.12.0 provider) is not registered error
While trying to import data from a legacy Excel file or an Access database in certain setups, you may encounter an error that the Microsoft Access Database Engine (Microsoft.ACE.OLEDB.12.0 provider) is not registered on the local machine. The error occurs on systems with only Office 2013 installed. To resolve this error, download the following resources to ensure that you can proceed with the data sources you are trying to access.
Need more help?
You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.