3 Replies Latest reply on Nov 14, 2010 1:11 PM by BertrandLegrand

    Export to text file

    BertrandLegrand

      Title

      Export to text file

      Post

      Hi there,

      I need to export to a csv file with fields seperated by semicolon (not komma) and the values NOT enclosed by quotes. Maybe this can be done by using the XLS format, but I'm absolutely unexperienced with XML and XSLS. Is there any script existing or other solutions? (for filemaker 11, must work in runtime solution).

        • 2. Re: Export to text file
          FentonJones

          When you use Export XML, with an XSL stylesheet, you get pretty much what you specify, neither more nor less. You specify what you want to get, what the "fields" and "records" are, and what you want between each.

          The only real problem with "semicolon separated" would be if there were semicolons in the data itself. I included another XSL file (commented) to handle that, by using the XSL "translate()" function, to change them into a colon instead.

          I used a Unix linefeed (ASCII 10) as the "records separator", as it's simplest. If Windows text is required, you'd need to add a carriage return, which is ASCII 13.

          I did not add anything for a header. That is also doable, but a little more complex. In that case you'd also need to decide whether you can just specify the header names manually (easiest), or if you need to read them from FileMaker's exported xml (they are there in the Metadata section).

          This example would work with a Runtime, as it uses a relative path to the XSL file (simplest). It would not work for a hosted file, where the XSL file would need to be somewhere everyone had consistent access to.

          Export_semicolon_xml.zip

          • 3. Re: Export to text file
            BertrandLegrand

            Great! Thanks a lot guys, I will work with this and hopefully succeed!