KNOWLEDGE BASE

Exporting to Crosstab in Tableau Server Truncates Leading 0


Published: 01 Oct 2015
Last Modified Date: 06 Jun 2016

Issue

When downloading a crosstab view from Tableau Server, cells that contain numbers with leading zeros might have those zeros truncated in the exported CSV file.

Environment

  • Tableau Server 9.0.x
  • Excel

Resolution

  1. Launch Excel and choose to open a new blank workbook.
  2. Click the Data tab and select From Text.
  3. Browse to the saved CSV file and select Import.
  4. Ensure that Delimited is selected and click Next.
  5. Leave Tab as the delimiter and click Next.
  6. Select the column containing the data with leading zeros and click Text.
  7. Repeat for each column which contains leading zeros.
  8. Click Finish.
  9. Click OK

Cause

The CSV file exported from Tableau Server does not contain the column data type. When opened in Excel, the default data type for columns containing numbers results in truncated leading zeros.
Did this article resolve the issue?