on 09-17-2018 8:29 AM
correct FCC.
Recordset.fieldFixedLengths 2,2,2,2
Recordset.endSeparator '0x0D''0x0A'
Recordset.fieldNames Output_1,Output_2,Output_3,Output_4
Recordset.keyFieldInStructure ignore
ignoreRecordsetName true
Recordset.fieldSeparator '0x09'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
Below is a sample XML and XSLT mapping.
Refer this and fulfill your requirement.
Test XML -
<ns0:MT_TEST_IN xmlns:ns0="urn://MM_Test_Sender">
<RECORD>
<NAME>awd</NAME>
<AGE>21</AGE>
<ADDRESS>XYZ</ADDRESS>
</RECORD>
<RECORD>
<NAME>werwer</NAME>
<AGE>65</AGE>
<ADDRESS>PQR</ADDRESS>
</RECORD>
ns0:MT_TEST_IN>
XSLT -
<?xml version="1.0" encoding="utf-8"?>
<?mso-application progid="Excel.Sheet"?>
<xsl:stylesheet version="1.0"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
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">
<xsl:template match="/">
<Workbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom" />
<Borders />
<Font />
<Interior />
<NumberFormat />
<Protection />
</Style>
<Style ss:ID="s21">
<Font ss:Size="22" ss:Bold="1" />
</Style>
<Style ss:ID="s22">
<Font ss:Size="14" ss:Bold="1" />
</Style>
<Style ss:ID="s23">
<Font ss:Size="12" ss:Bold="1" />
</Style>
<Style ss:ID="s24">
<Font ss:Size="10" ss:Bold="1" />
</Style>
</Styles>
<Worksheet ss:Name="Page1">
<Table>
<xsl:call-template name="XMLToXSL" />
</Table>
</Worksheet>
</Workbook>
</xsl:template>
<xsl:template name="XMLToXSL">
<Row>
<Cell>
<Data ss:Type="String">Name</Data>
</Cell>
<Cell>
<Data ss:Type="String">Age</Data>
</Cell>
<Cell>
<Data ss:Type="String">Address</Data>
</Cell>
</Row>
<xsl:for-each
select="//RECORD">
<Row>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="NAME" />
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="AGE" />
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<xsl:value-of select="ADDRESS" />
</Data>
</Cell>
</Row>
</xsl:for-each>
</xsl:template>
<xsl:template match="MT_TEST_IN">
</xsl:template>
</xsl:stylesheet>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Apu Das for sharing this but this is for my practice.
I need output as each data in the different cell using FCC. attached the screen shot.
I'd recommend using the FormatConversionBean for this:
https://blogs.sap.com/2014/11/03/exceltransformbean-part-2-convert-simple-xml-to-various-excel-forma...
FCC only creates Fixed Field lengths or CSVs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.