cancel
Showing results for 
Search instead for 
Did you mean: 

data issue in .xsl file generation

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

amarnath_m
Explorer
0 Kudos

Hi Aditi

Try with File Content Conversion or XMLtoFlatFile Bean..

Regards

Amarnath

Former Member
0 Kudos

Hi Amarnath,

How to achieve it with file content conversion or XMLtoFlatFile Bean?

Regards,

Aditi

amarnath_m
Explorer
0 Kudos

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