Upload a file

Upload a local file to use its contents in Power Query Online. The uploaded file is stored in your OneDrive for work or school account, and Power Query creates a query that reads it.

To start from the Upload module in Get data, go to Upload module. This article covers supported formats, the connector's upload and sign-in steps, and drag and drop from the query editor.

The following connectors currently support the upload a file feature.

Note

Only files with the following extensions are supported for upload: .csv, .json, .pdf, .prn, .tsv, .txt, .xl, .xls, .xlsb, .xlsm, .xlsw, .xlsx, .xml.

Upload a file experience

When you select a connector that offers the Upload file experience, a radio button appears on the top of the Connection settings that enables this feature.

Screenshot of the Upload file option in the connection settings section of the connect to a data source dialog.

When you select Upload file, the option underneath opens a simple dialog to let you either drag a file or browse in your local file system to upload a file.

Screenshot of the Upload file enabled, with the drag a file here to upload or browse experience that lets the user upload a file.

After you select a file, a progress bar shows the upload's progress. When the upload finishes, a green check mark, Upload successful, and the file size appear underneath the file name.

Screenshot of a successful upload of a file through the upload file feature, showing the icon of the file extension, the name of the file, and the size of the file.

Note

The files you upload through this feature are stored in your OneDrive for work or school account, not at the original local path. Don't assume that changing the original file on your computer changes the uploaded copy.

In the illustrated connector experience, change the authentication kind from Anonymous to Organizational account before selecting Next. Select Sign in to authenticate to the account used for the uploaded file.

Screenshot of the connection credentials section, where the authentication kind is set to organizational account.

After authentication, You are currently signed in appears underneath Authentication Kind. Select Next to create a query from the uploaded file stored in your OneDrive for work or school account.

Screenshot of the Connect to data source page with a user authenticated using the organizational account authentication kind.

Drag-and-drop experience in the query editor

In the Power Query editor, drop a file onto the diagram view or queries pane to upload it.

Screenshot of a file being dropped in the diagram view of the Power Query editor, along with the Upload file message.

The editor opens the connector settings for the file's extension. For example, dropping a text file opens the Text/CSV connection settings.

Screenshot of the Text / CSV connector settings page shown after you drop a text file on the diagram view of the Power Query editor.

Check the file before using the query

Confirm that the extension is supported, the upload completed successfully, and you signed in with the required organizational account. In the data preview, check the file's interpretation, such as the delimiter for a CSV file or the selected sheet in an Excel workbook.

If the file already exists online, use its existing source connection rather than creating another copy unless you need a separate uploaded file.