Tableau - Connecting to Excel and Text Files on Network Drives


Introduction

Often data sources for dashboards are flat files instead of databases. In this case you can still connect live to them but a few options must be set. Using Dropbox or Google Sheets are preferred alternatives. 

Requirements For Network Drives

  • Datasource must be created from a Windows Workstation
  • A file format that Tableau can connect to (xls, xlsx, txt, csv, tde, hyper, etc)
  • The file must be located on a Windows network drive
  • The user tableau-server must be granted access to the file
  • You must use the full UNC path
  • Do not include external files when publishing

Instructions

Paths

A common mistake is that Tableau attempts to connect to a folder that is mapped on your computer. A UNC path is in the form of \\host-name\share-name\folder-name\filename.ext

When connecting to the file you should use the UNC path instead something with a drive letter ( T:\folder\file.txt ).

Permissions

The account the Tableau Server operates under is called tableau-server and it will need access to your network drive to be able to use the 

Do NOT include external files

If you leave the 'Include external files' box checked when publishing it will include the file and not look at the network location.

Do not check the include external files box

Alternatives

Since the Tableau Server runs on Windows using file paths from a Mac client does not work. In these cases, a server datasource can be created and published using a Windows version and then connected from Tableau Desktop on a Mac. 

Dropbox or Google Sheets are alternatives to using a network drive and can be easier to set up.

 

Troubleshooting and Issues
Excel files will often show as locked and that another user is accessing them. This behavior is common when using files on network drives.

Inherited permissions can also cause problems. Make sure the tableau-server account has access to the folder before moving a file into it.