1 Reply Latest reply on Jun 29, 2010 10:11 AM by FentonJones

    Export options



      Export options


      Last time i used FM was version 3 or 4 so it is a mega gap to version 11 :) I have a little knowledge with database (self learner) and i try to export records to a format that my other application (XMPie uPlan) will understand.


      Option 1: Excel (.xls) because it worked well. Problem is if the first 8 records doesn't have 255 characters, it will truncate the following to 255 max.

      Option 2: Tab-delimited. The only problem is that i need a header row with the field names. Is there a way to add that in a Tab-delimited export?


      Some suggested to use MySQL but i don't even know what it does so i will not go there for now if a have another choice.





        • 1. Re: Export options

          The following XSL Stylesheet, using during an Export XML..., will add the field names, as read from FileMaker, to a tab-separated text file. You will need to read the help about using Export  XML. 


          Right now the  output is using Unix line returns, ASCII 10. But you can change that if needed.


          This simple export will not see multiple repetitions of repeating fields, nor more than the 1st record of related data. So it's for basic data in one table, or 1-to-1 to related table(s)' fields.



          <?xml version='1.0' encoding='utf-8'?>

          <xsl:stylesheet xmlns:fmp="http://www.filemaker.com/fmpxmlresult"

          exclude-result-prefixes="fmp" version="1.0"


          <xsl:output method="text"/>

          <xsl:template match="/">

          <xsl:for-each select="fmp:FMPXMLRESULT/fmp:METADATA">

          <xsl:for-each select="fmp:FIELD">

          <xsl:value-of select="@NAME"/>

          <xsl:if test="position()!=last()"><xsl:text>&#09;</xsl:text></xsl:if>




          <xsl:for-each select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW">

          <xsl:for-each select="fmp:COL/fmp:DATA">

          <xsl:value-of select="."/>

          <xsl:if test="position()!=last()"><xsl:text>&#09;</xsl:text></xsl:if>


          <xsl:if test="position()!=last()"><xsl:text>&#10;</xsl:text></xsl:if>