1 Reply Latest reply on Jul 18, 2018 9:05 AM by Joshua Milligan

    Importing fixed-width text files


      Hi, I am trying to import fixed-width text files that are not delimited.


      I prefer to do this with Tableau Prep given the workflow features, however Tableau Prep seems to only accept delimited text files.


      Next, I tried importing with a dummy “delimiter” e.g. “|” or “~”, thinking that I could manually process it using a string of MID functions in a Clean step.


      However, this also didn’t work because Prep removed all whitespace in the fixed-width file, leaving me with random widths between records, and so I can’t use MID on this.


      Any tips on the best way to deal with importing fixed-width text files?


      Any help would be greatly appreciated. Thanks!


      P/S: I also read about using schema.ini to import fixed-width text files in Tableau, but this method also did not work for me as Tableau ignored the schema.ini when importing.


      Tableau Prep (

      Tableau 10.5.4 (10500.18.0510.1801) 64-bit

      macOS 10.13.5

        • 1. Re: Importing fixed-width text files
          Joshua Milligan



          I have tested and agree with your findings - currently there's not a way to successfully use fixed width files that are padded with spaces in Tableau Prep.  I have created an idea for such support here: https://community.tableau.com/ideas/9038 (please upvote!)


          In the meantime, you might consider the possibility of first replacing the spaces with another unused character prior to importing in Tableau Prep and then replacing that character with spaces in Tableau Prep.  I believe that would work.  You could do this with a text editor or automate with a script.


          Best Regards,


          2 of 2 people found this helpful