Если хотите выгружать - то и формируйте в программе xml-ку удобного вида(то есть только с содержательными данными) и потом вызывайте xlt преобразование. imho concatenate не реально.
Код на абапе не привожу - в хелпе подробно описано что и как делать.
Пример выгрузки прайслиста - в коде формируется xml дерево произвольной вложенности, которое потом экспортится в эксел.
Причем работает в фоне на юниксовом сервере
Code:
Примерный вид - пишу по памяти
<header>
<created>1.10.2007<created>
<name>Boger<name>
</header>
<categories name = "Нормальный">
<category>
<node name="Принтеры">
<node name="HP">
<material> ...</material>
....
</node>
...
</node name="Samsung">
</node>
</category>
<category name = "Брак">
...
</category>
</categories>
Code:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sapxsl="http://www.sap.com/sapxsl" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:output indent="yes"/>
<xsl:template match="catalog">
<?mso-application progid="Excel.Sheet"?>
<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">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>
<xsl:value-of select="//header/name"/>
</Author>
<LastAuthor>
<xsl:value-of select="//header/name"/>
</LastAuthor>
<Created>2005-09-16T09:38:52Z</Created>
<LastSaved>2005-11-29T15:03:40Z</LastSaved>
<Company>Home</Company>
<Version>11.6360</Version>
</DocumentProperties>
<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
<Colors>
<Color>
<Index>39</Index>
<RGB>#E3E3E3</RGB>
</Color>
</Colors>
</OfficeDocumentSettings>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>6840</WindowHeight>
<WindowWidth>13170</WindowWidth>
<WindowTopX>0</WindowTopX>
<WindowTopY>0</WindowTopY>
<TabRatio>601</TabRatio>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font x:CharSet="204"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s23">
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom" ss:WrapText="1"/>
<Font ss:Bold="1"
x:CharSet="204" x:Family="Swiss"/>
</Style>
</Styles>
<xsl:apply-templates select="categories"/>
</Workbook>
</xsl:template>
<xsl:template match="categories">
<xsl:apply-templates select="category"/>
</xsl:template>
<xsl:template match="category">
<Worksheet xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x="urn:schemas-microsoft-com:office:excel" ss:Name="{@name}">
<Table
ss:ExpandedColumnCount="100" ss:ExpandedRowCount="{2+count(descendant-or-self::line|descendant-or-self::node)}" x:FullColumns="1" x:FullRows="1">
<Column ss:AutoFitWidth="0" ss:Width="51"/>
<Column ss:AutoFitWidth="0" ss:Width="41.25"/>
<Column ss:AutoFitWidth="0" ss:Width="55.5"/>
<Column ss:AutoFitWidth="0" ss:Index="5" ss:Width="62.25"/>
<Column ss:AutoFitWidth="0" ss:Width="191.25"/>
<Column ss:AutoFitWidth="0" ss:Width="130.5"/>
<Column ss:AutoFitWidth="0" ss:Width="56.25"/>
<Column ss:AutoFitWidth="0" ss:Width="40.5"/>
<Column ss:AutoFitWidth="0" ss:Width="51.75"/>
<Column ss:AutoFitWidth="0" ss:Width="66.75"/>
<Row>
<Cell>
<Data ss:Type="String">Дата выгрузки:
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="//header/date"/>
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="//header/time"/>
</Data>
</Cell>
</Row>
<Row ss:Height="38.25" ss:StyleID="s23">
<Cell ss:Index="5">
<Data ss:Type="String">Код материала</Data>
</Cell>
<Cell>
<Data ss:Type="String">Описание</Data>
</Cell>
<Cell>
<Data ss:Type="String">P/N</Data>
</Cell>
....
</Row>
<xsl:apply-templates select="node"/>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<Selected/>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</xsl:template>
<xsl:template match="node">
<xsl:apply-templates select="node"/>
<xsl:apply-templates select="data"/>
</xsl:template>
<xsl:template match="data">
<xsl:for-each select="material">
<Row xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<Cell ss:Index="5">
<Data ss:Type="Number">
<xsl:value-of select="MATNR"/>
</Data>
</Cell>
....
<Cell>
<Data ss:Type="Number">
<xsl:value-of select="STOCKRF"/>
</Data>
</Cell>
<Cell>
<Data ss:Type="Number">
<xsl:value-of select="STOCKRF_FREE"/>
</Data>
</Cell>
</Row>
</xsl:for-each>
</xsl:template>
</xsl:transform>
PS для лучшей читаемости xlt обрезано вручную, так что валидность не гарантирую.