5 Replies Latest reply on Mar 5, 2013 10:06 PM by mattb

    Export Records / Tab-Separated Text

    mattb

      Title

      Export Records / Tab-Separated Text

      Post

           FMP 11 Advanced, Macintosh

           I'm trying to export the contents of one field in a 200-record table to an ASCII (plain text) file.  It seems that Export Records / Tab-Separated Text is the only choice I can use to achieve this.  The file does get created and it actually looks OK both in TextEdit and in Word for Mac, but when I import it into the application of choice (Final Draft), it just looks totally wonky.

           Upon further review of the Export Records / Tab-Separated Text in the FMP help system, I find the following curious information:

            
      Tabs in fields are converted to spaces.
           Carriage return characters in a field export as vertical tab characters.

           Yikes!  Both TextEdit and Word for Mac seem to handle this OK, but Final Draft is apparently expecting an absolutely plain-jane text file and unfortunately, the exported field contains both tabs and carriage returns, which I need to preserve instead of having them converted into something else!  This also explains the wonky appearance when imported into Final Draft.

           So...can somebody please tell me if it's possible to export a field fron a FMP table that contains both carriage returns and tabs into a plain old text file, with the CRs and tabs preserved?  Thanks...

            

           Matt Bloomfield

            

            

        • 1. Re: Export Records / Tab-Separated Text
          philmodjunk

               Since you are exporting a single field, what do you get if you export to csv?

          • 2. Re: Export Records / Tab-Separated Text
            mattb

            Since you are exporting a single field, what do you get if you export to csv?

                 The FMP help file reports the following conversions for CSV text files:

            Carriage return characters in a field export as vertical tab characters.
                 Values in repeating fields are separated by the group separator character.
                 Only numeric data is exported from number fields. Any non-numeric data such as text or symbols is not included in the exported data.
                 Quotation marks (") in a field (not curly quotes) export as double quotation marks ("").

                 So, carriage returns are still being converted to vertical tabs.  The other 3 don't apply to my situation one way or the other.  At any rate, a test of CSV yields the same wonky results - I need those carriage returns to stay just as they are!

                  

                  

            • 3. Re: Export Records / Tab-Separated Text
              philmodjunk

                   That at least puts tabs where you need them. A numer of text editing utilities can turn the verical tabs back into returns. You might be able to do a find replace in Final Draft that replaces the vertical tabs with returns. I can certainly do that in MS. Word.

                   This change is needed for typical exports to text files as the returns serve as record separators and so exporting returns unchanged messes up the typical tab or csv file.

                   Another option you might research is an xml export of the data. You might be able to set up a "grammar" that gives you what you need.

              • 4. Re: Export Records / Tab-Separated Text
                mattb

                Another option you might research is an xml export of the data. You might be able to set up a "grammar" that gives you what you need.

                     This may ultimately be the best option as FMP will export XML files using a user-created XSL (XML Stylesheet) file.  Unfortunately, I don't know how to do this.  I bought an XML/XSL book a while back and found it to be too hard to understand, so I gave up.  Maybe there's an XSL "Dummies" book out there...do you have any knowledge on how to create XSL files?

                      

                • 5. Re: Export Records / Tab-Separated Text
                  mattb

                       Well, I finally solved the problem by employing a somewhat cumbersome but ultimately effective tactic:

                       I concatenated the material from the field in the original 200-record table into a single field in another table.  Then instead of using Export Records from the original table, I'm now able to use  Export Field Contents from the single-record table.  That one doesn't convert carriage returns and tabs at all and the resulting file imports beautifully into Final Draft.