This article describes how to connect Tableau to Microsoft Excel file data and set up the data source. Tableau connects to .xls and .xlsx files.
To connect to a .csv file, use the Text file connector.
After you open Tableau, under Connect, click Excel.
Select the Excel workbook you want to connect to, and then click Open.
Alternatively, in Tableau Desktop on Windows, to connect to the Excel file using the Microsoft Jet-based connection, in the Open dialog box, click the Open drop-down menu, and then select Open with Legacy Connection. The Data Source page appears.
IMPORTANT: Starting in Tableau 2019.1, you can no longer create a new Legacy Excel or Text connection. Existing workbooks created with these legacy connections will continue to work until 2020.2, when all support for legacy connections is planned to be removed. See the Legacy Connection Alternatives document in Tableau Community for alternatives to using the legacy connection.
On the Data Source page, do the following:
(Optional) Select the default data source name at the top of the page, and then enter a unique data source name for use in Tableau. For example, use a data source naming convention that helps other users of the data source figure out which data source to connect to.
If your Excel file has one table, click the sheet tab to start your analysis.
Use custom SQL to connect to a specific query rather than the entire data source. For more information, see Connect to a Custom SQL Query.
You can also connect to a named range or an Excel table (also known as an Excel list) in the same way you connect to a worksheet. Both the named range and Excel table function as a table in Tableau.
You create named ranges in Excel by selecting a range of cells and then selecting Define Name on the Formulas tab. Similar to named ranges, you can create an Excel table in Excel by selecting a range of cells, and then selecting Insert > Table. When you connect to a named range or Excel table in Tableau, an icon appears next to the sheet in the Data Source page as shown below.
You can connect to multiple Excel workbooks at the same time as long as each connection in the data source has a unique name.
Note: Tableau does not support pivot tables in Excel.
Microsoft Excel data source example
Here is an example of a Microsoft Excel data source is shown below.
Note: If the Excel file contains columns that are more than 254 characters wide, Tableau Desktop can't use these fields for workbooks that were created before Tableau Desktop 8.2. Also, you cannot use the legacy connection to connect to this data. Either remove the columns, modify them to fit within 254 characters prior to connecting in Tableau Desktop, or upgrade the Excel data source. For more information about upgrading data sources, see Upgrade Data Sources.
Get more data into your data source by adding more tables or connecting to data in a different database.
Add more data from different databases: In the left pane, click Add next to Connections. For more information, see Join Your Data.
If a connector you want is not listed in the left pane, select Data > New Data Source to add a new data source. For more information, see Blend Your Data.
Excel table options are scoped to the connection. To change the table options, on the canvas, click the table drop-down arrow and then specify whether the data includes field names in the first row. If so, these names will become the field names in Tableau. If field names are not included, Tableau generates them automatically. You can rename the fields later.
If Tableau detects that it can help optimize your data source for analysis, it prompts you to use Data Interpreter. Data Interpreter can detect sub-tables that you can use and remove unique formatting that might cause problems later on in your analysis. For more information, see Clean Data from Excel, CSV, PDF, and Google Sheets with Data Interpreter.
You might notice .ttde or .hhyper files when navigating your computer's directory. When you create a Tableau data source that connects to your data, Tableau creates a .ttde or .hhyper file. This file, also known as a shadow extract, is used to help improve the speed your data source loads in Tableau Desktop. Although a shadow extract contains underlying data and other information similar to the standard Tableau extract, a shadow extract is saved in a different format and can't be used to recover your data.
In certain situations, you might need to delete a shadow extract from your computer. For more information, see Low Disk Space because of TTDE Files in the Tableau Knowledge Base.
Starting from version 10.5, when you are working with extract data sources as well as data sources that use live connections to file-based data like Excel, the values in your data can be computed differently from previous versions of Tableau. This change means that you might see differences between the data and the marks in your view between version 10.4 (and earlier) and version 10.5 (and later). The purpose of this change is to improve the efficiency and scalability of your Excel data source. For more information, see Changes to values and marks in the view.
In the case of an Excel data source, one example of this change is with case sensitivity. In version 10.4 (and earlier), for comparing and sorting purposes, string values are treated as case insensitive and therefore treated the same and stored as a single string value. In version 10.5 (and later), for sorting and comparing purposes, values remain case insensitive. However, values are case sensitive for storing purposes. This becomes evident when values are displayed on the data source page.
For example, suppose you have a column in your data that contains the values "House," "HOUSE," and "houSe." You see the following string values depending on the version of Tableau you are using:
In version 10.4 and earlier, both on the data source page and view, you see: "House," "House," and "House."
In version 10.5 and later, on the data source page you see: "House," "HOUSE," and "houSe." But in the view you see: "House," "House," and "House."
If you need to maintain case sensitivity for your data when performing a join, you can enable the Maintain Character Case (Excel) option from the Data menu. For more information about this option, see About working with multi-connection data sources.
- Set Up Data Sources – Add more data to this data source or prepare your data before you analyze it.
- Build Charts and Analyze Data – Begin your data analysis.
Data Prep with Text and Excel Files - Watch the Tableau video (registration or sign in required).