XSL Prenant la transformation de XML dans Excel

Petit nouveau ici, alors restez avec moi. Ive a obtenu une base de fichier XSL qui va lire mes données xml. Im essayant de mettre xml dans Excel. Voilà mon problème. Avec un petit fichier XML, il semble pour le convertir facile, MAIS avec ce fichier XML qui avait plusieurs nœuds ( je pense qu'ils sont appelés), quand j'ai appeler les données, il n'est pas droit. Je veux seulement afficher les infos de la vérification partie de XML et de montrer ensuite dans Excel dans une manière qui montre le 6 ou le 7 colonnes que je veux, puis afficher les données. Voici ce que j'ai à ce jour:

XML:

<bdiData>
  <documentControlInfo>
    <documentInfo>
      <docDescription>Checks for Company X</docDescription>
      <docID>
        <ID>123456789</ID>
      </docID>
      <docModifier>My Company</docModifier>
      <docCreateDate>2010-08-23</docCreateDate>
      <docCreateTime>07:08:54-0700</docCreateTime>
      <standardVersion>1.0</standardVersion>
      <testIndicator>0</testIndicator>
      <resendIndicator>0</resendIndicator>
    </documentInfo>
    <sourceInfo>
      <sourceName>My Banking Name</sourceName>
      <sourceID>
        <idOther>ShortBankName</idOther>
      </sourceID>
    </sourceInfo>
    <destinationInfo>
      <destinationName>My Company</destinationName>
      <destinationID>
        <idOther>MYCO</idOther>
      </destinationID>
    </destinationInfo>
  </documentControlInfo>
  <checkItemCollection>
    <collectionInfo>
      <description>Items</description>
      <ID>654811650</ID>
      <Classification>
        <classification>Items</classification>
      </Classification>
    </collectionInfo>
    <checkItemBatch>
      <checkItemBatchInfo>
        <description>Paid Checks</description>
        <ID>1239668334710</ID>
        <Classification>
          <classification>Paid Checks</classification>
        </Classification>
      </checkItemBatchInfo>
      <checkItem>
        <checkItemType>check</checkItemType>
        <checkAmount>2960</checkAmount>
        <postingInfo>
          <date>2009-06-12</date>
          <RT>87654321</RT>
          <accountNumber>123465798</accountNumber>
          <seqNum>007725552898</seqNum>
          <trancode>001152</trancode>
          <amount>2960</amount>
          <serialNumber>55225410</serialNumber>
        </postingInfo>

Fichier XSL:

<xsl:stylesheet version="1.0"
    xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:msxsl="urn:schemas-microsoft-com:xslt"
 xmlns:user="urn:my-scripts"
 xmlns:o="urn:schemas-microsoft-com:office:office"
 xmlns:x="urn:schemas-microsoft-com:office:excel"
 xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" >

  <xsl:template match="/">
    <Workbook 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:html="http://www.w3.org/TR/REC-html40">
      <xsl:apply-templates/>
    </Workbook>
  </xsl:template>


  <xsl:template match="/*">
    <Worksheet>
      <xsl:attribute name="ss:Name">
        <xsl:value-of select="local-name(/*/*)"/>
      </xsl:attribute>
      <Table x:FullColumns="1" x:FullRows="1">
        <Row>

          <xsl:for-each select="*[position() = 2]/*/checkItem/postingInfo/*">

            <Cell>
              <Data ss:Type="String">
                <xsl:value-of select="local-name()"/>
              </Data>
            </Cell>
          </xsl:for-each>
        </Row>
        <xsl:apply-templates/>
      </Table>
    </Worksheet>
  </xsl:template>


  <xsl:template match="/*/checkItem/postingInfo/*">
    <Row>
      <xsl:apply-templates/>
    </Row>
  </xsl:template>


  <xsl:template match="/*/checkItem/postingInfo/*">
    <Cell>
      <Data ss:Type="String">
        <xsl:value-of select="."/>
      </Data>
    </Cell>
  </xsl:template>


</xsl:stylesheet>

Quelqu'un aurait-il une Idée de comment je peux obtenir Simplement la case à la partie f du fichier XML et l'avoir dans un format eay??

Grâce

GabrielVA

Pouvez-vous poster le code XML avec des balises?

OriginalL'auteur GabrielVa | 2010-08-20