AnsweredAssumed Answered

Xml & XSLT => Excel Error....On NO!!!!!!!

Question asked by sungnakhee on Sep 27, 2017
Latest reply on Oct 10, 2017 by sungnakhee

<?xml version="1.0" encoding="utf-16"?>

<?mso-application progid="Excel.Sheet"?>

<xsl:stylesheet version="1.0"

  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

  xmlns:html="http://www.w3.org/TR/REC-html40"

  xmlns="urn:schemas-microsoft-com:office:spreadsheet"

  xmlns:o="urn:schemas-microsoft-com:office:office"

  xmlns:x="urn:schemas-microsoft-com:office:excel"

  xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"

  xmlns:xalan="http://xml.apache.org/xalan"

  xmlns:fmp="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fmp">

 

 

  <xsl:template match="/">

  <Workbook>

  <Styles>

  <Style ss:ID="Default" ss:Name="Normal">

  <Alignment ss:Vertical="Bottom"/>

  <Borders/>

  <Font ss:FontName="맑은 고딕" x:CharSet="129" ss:Size="12" ss:Color="#000000"/>

  <Interior/>

  <NumberFormat/>

  <Protection/>

  </Style>

  <Style ss:ID="Stitle">

  <Alignment ss:Horizontal="Left" ss:Vertical="Center"/>

  <Borders>

  <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2"/>

  <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2"/>

  </Borders>

  <Font ss:FontName="NanumGothic" x:CharSet="129" ss:Size="11"/>

  </Style>

  <Style ss:ID="Sdatanum">

  <Alignment ss:Vertical="Center"/>

  <Borders>

  <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2"/>

  <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2"/>

  </Borders>

  <Font ss:FontName="NanumGothic" x:CharSet="129" ss:Size="11"/>

  <NumberFormat ss:Format="#,##0.000;@"/>

  </Style>

  <Style ss:ID="Sdatatext" ss:Parent="s17">

  <Alignment ss:Vertical="Bottom"/>

  <Borders>

  <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2"/>

  <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2"/>

  </Borders>

  <Font ss:FontName="NanumGothic" x:CharSet="129" ss:Size="11"/>

  <Interior/>

  <NumberFormat ss:Format="#,##0.000;@"/>

  </Style>

  </Styles>

  <Worksheet ss:Name="{fmp:FMPXMLRESULT/fmp:DATABASE/@NAME}">

  <Table x:FullColumns="1" ss:DefaultRowHeight="18">

  <xsl:call-template name="FMP"/>

  <xsl:for-each select="Column">

  <xsl:attribute name="ss:AutoFitWidth">1</xsl:attribute>

  </xsl:for-each>

  </Table>

  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">

  <PageSetup>

  <Header x:Margin="0.3"/>

  <Footer x:Margin="0.3"/>

  <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>

  </PageSetup>

  <PageLayoutZoom>0</PageLayoutZoom>

  <Selected/>

  <Panes>

  <Pane>

  <Number>3</Number>

  <ActiveRow>3</ActiveRow>

  <ActiveCol>2</ActiveCol>

  </Pane>

  </Panes>

  <ProtectObjects>False</ProtectObjects>

  <ProtectScenarios>False</ProtectScenarios>

  </WorksheetOptions>

  </Worksheet>

  </Workbook>

  </xsl:template>

  <xsl:template name="FMP">

  <Row ss:AutoFitHeight="1">

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

  <Cell ss:Index="2" ss:StyleID="Stitle" >

  <Data ss:Type="String">

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

  </Data>

  </Cell>

  </xsl:for-each>

 

  </Row>

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

  <Row>

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

  <xsl:variable name="i" select="position()"/>

  <xsl:variable name="zFieldName" select="/fmp:FMPXMLRESULT/fmp:METADATA/fmp:FIELD[$i]/@NAME"/>

  <xsl:variable name="zFieldType" select="/fmp:FMPXMLRESULT/fmp:METADATA/fmp:FIELD[$i]/@TYPE"/>

  <Cell>

  <xsl:choose>

  <xsl:when test="$zFieldType='TEXT'">

  <Data>

  <xsl:attribute name="ss:StyleID">Sdatatext</xsl:attribute>

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

  </Data>

  </xsl:when>

  <xsl:when test="$zFieldType='NUMBER'">

  <Data>

  <xsl:attribute name="ss:StyleID">Sdatanum</xsl:attribute>

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

  </Data>

  </xsl:when>

  </xsl:choose>

  </Cell>

  </xsl:for-each>

  </Row>

  </xsl:for-each>

  </xsl:template>

</xsl:stylesheet>

 

I tried to make 4 hours ... Error Error Error Error Error ...

I am not confident to live ...

I can not debug, so I do not know where the problem is.

Can you help me? ... ㅠ

Attachments

Outcomes