on 08-23-2016 4:46 PM
Hello Experts,
My scenario is RFC to FTP in which I have to generate excel file(.xsl) on FTP server.
I am using below xslt code to generate .xsl file on FTP server.
<?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="BP">
<Table>
<xsl:call-template name="XMLToXSL" />
</Table>
</Worksheet>
</Workbook>
</xsl:template>
<xsl:template name="XMLToXSL">
<Row>
<Cell>
<Data ss:Type="String">ADDRESS1</Data>
</Cell>
<Cell>
<Data ss:Type="String">ADDRESS2</Data>
</Cell>
</Row>
<xsl:for-each select="//IT_DET/item">
<Row>
<Cell>
<Data ss:Type="String"><xsl:value-of select="ADDRESS1" /></Data>
</Cell>
<Cell>
<Data ss:Type="String"><xsl:value-of select="ADDRESS2" /></Data>
</Cell>
<Cell>
</Row>
</xsl:for-each>
</xsl:template>
<xsl:template match="ZCF_PART">
</xsl:template>
</xsl:stylesheet>
I have used string type in xslt code for receiver side fields.
If I am getting numbers+characters(123House) in field,then that field is getting generated properly in excel on FTP.
But when I am getting only numbers(e.g 123) in field that time I am not getting any value in that field.
I guess it is happening because we have taken string at receiver side but sender is sending number in it.
and problem is if i take integer as a type in xslt code then at receiver side the fields having mix data ,...for ex. 123,house.....will be affected.
Please suggest.
Regards,
Aditi
Hi Aditi
Try with File Content Conversion or XMLtoFlatFile Bean..
Regards
Amarnath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Aditi
Go thru the link,
https://wiki.scn.sap.com/wiki/display/XI/File+Content+Conversion
SAPTechnical.COM - File Content Conversion
Save the file in your respected extension like .xsl
Regards
Amarnath
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.