Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic WorkSheet with Transformation xslt

chau1995
Active Participant
0 Kudos

Hello everyone,
I have two question
First,I am using transformation to create excel
I want to build each document number for one sheet
But when I use for-each to loop workSheet, I can't create more worksheet because duplicate ss:Name
Could any help me how to create dynamic ss:Name in WorkSheet.
Second: Could any help me how to get current Row in excel xslt ( i dont know which function to get it)
Thanks so much

5 REPLIES 5

Sandra_Rossi
Active Contributor
0 Kudos

There's really no ABAP in this question. It's all about XSLT which is not SAP. And for Excel 2003, just save a sample file with 2 sheets via Excel, and compare this file with the result of your transformation.

chau1995
Active Participant
0 Kudos

I think that is abap question because i call transformation from abap code.
And using xslt for coding transformation.
Assign internal table into this xslt.
But in this problem, i don't know how to pass value to ss:Name in workSheet

0 Kudos

You should only submit an answer when you are proposing a solution to the poster's problem.

Sandra_Rossi
Active Contributor

I didn't understand that your question was about how to pass an internal table to the transformation, and how to bind a component to an attribute of XML element. Could you post your ABAP + XSLT + result you obtain + what you expect, so that it's easier to answer what you did wrong?

Example of XSLT:

<xsl:for-each select="ITAB/item">
  <Worksheet>
    <xsl:attribute name="ss:Name">
      <xsl:value-of select="COMP">
    </xsl:attribute>

chau1995
Active Participant

Thanks so much sandra.rossi, It worked
and i also researched a solution same as you: <Worksheet ss:Name = "{variable}">
Thanks so much