1 Reply Latest reply on Dec 6, 2018 9:11 AM by Okechukwu Ossai

    String Format Changing

    Rajiv Kumar

      We have reports which contain usernames made of Numeric Numbers. After publishing it on tableau Online, when i try to download those reports through cross tab in Excel , then there is change in format of some username. For example usernames "012523" and "23sep"  is showing "12523" and "23-sep" after downloading in cross tab excel. I do not want this change to happen when downloading the report. The usernames should be as it is as showing in tableau online report. I have also attached 2 different images, one of which shows Username in tableau and Username after downloading from tableau online through cross tab in Excel.

      Cross Tab in Excel.PNGUsername in Tableau Report.PNG

      Note: Please Note I already Change the data type of username to string using str() function. But it still not working.

        • 1. Re: String Format Changing
          Okechukwu Ossai

          Hi Rajiv,

           

          The problem is due to the way Excel renders data downloaded from Tableau. There are many ways to deal with this depending on the source of download.

           

          If you are downloading from Tableau Server or Online. Tableau already has a suggested solution in the link below.

          https://kb.tableau.com/articles/issue/exporting-to-crosstab-truncates-leading-0

           

           

           

          Alternatively, if you are exporting directly from Tableau Desktop then you can try one of the approaches below.

           

          1: Use Export Crosstab to Excel. This method exports the data directly into Excel and will preserve the formats. However, it can be very slow if your crosstab is large.

           

          2: Use Copy Crosstab. This method is relatively faster. However, you will need to manually paste the data into an Excel sheet and the leading zeroes will not be preserved.

           

          To preserve the leading zeroes,

          In Excel, go to File and click the dropdown button under Paste. Select the Use Text Import Wizard option. Click Next

           

           

           

           

          Hope this helps.

          Ossai