![](https://static.goldenline.pl/user_photo_basic.jpg)
konto usunięte
Temat: Wydruk XML (XSL->Excel) polskie znaki
Witam,Tworzę wydruk XML, przenoszący DataSet do formatu Excelowskiego. Mam problem z kodowaniem polskich znaków. Otóż otrzymując wynikowy arkusz excelowski, otrzymuję krzaczki w miejsce polskich liter. Zauważyłem, jednak iż problem pojawia się wraz z rozrostem struktury tabelarycznej(jedna tabela, badź tabelki pod sobą nie powodują generowania tego błędu), w której zapisuje DataSet. Poniżej kod, byłbym wdzięczny za wszelkie wskazówki.
pzdr
Mateusz H. edytował(a) ten post dnia 16.09.11 o godzinie 10:31
[SQL]
tu jakas procedura sql;)
[XSL]
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:usr="urn:the-xml-files:xslt" >
<xsl:output omit-xml-declaration="yes" method="html" version="1.0" encoding="utf-16" indent="yes"/>
<xsl:preserve-space elements="*"/>
<xsl:template match="/">
<xsl:for-each select="ROOT">
<xsl:apply-templates select="RECORDSET1"/>
</xsl:for-each>
</xsl:template>
<xsl:template match="RECORDSET1">
<xsl:apply-templates select="RECORD" mode="r1"/>
</xsl:template>
<xsl:template match="RECORD" mode="r1">
<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">
<Worksheet ss:Name="Sheet1">
<TABLE>
<TR>
<TD>
<TABLE>
<TR>
<TD></TD>
<TD colspan="4">
<font face="Times New Roman" size="2"><Data ss:Type="String"><xsl:value-of select="@frm_nazwa1"/></Data></font>
</TD>
</TR>
<TR>
<TD></TD>
<TD>
<font face="Times New Roman" size="2"><Data ss:Type="String"><xsl:value-of select="@frm_nazwa2"/></Data></font>
</TD>
</TR>
<TR>
<TD></TD>
<TD colspan="4">
<font face="Times New Roman" size="2"><Data ss:Type="String"><xsl:value-of select="@frm_nazwa3"/></Data></font>
</TD>
</TR>
<TR>
<TD></TD>
<TD colspan="4">
<font face="Times New Roman" size="2"><Data ss:Type="String"><xsl:value-of select="@frm_miasto"/></Data></font>
</TD>
</TR>
<TR>
<TD></TD>
<TD colspan="4">
<font face="Times New Roman" size="2"><Data ss:Type="String"><xsl:value-of select="@frm_ulica"/></Data></font>
</TD>
</TR>
<TR>
<TD></TD>
<TD colspan="4">
<font face="Times New Roman" size="2"><Data ss:Type="String"><xsl:value-of select="@frm_nip"/></Data></font>
</TD>
</TR>
<TR>
<TD></TD>
<TD colspan="4">
<font face="Times New Roman" size="2"><Data ss:Type="String"><xsl:value-of select="@frm_telefon"/></Data></font>
</TD>
</TR>
<TR>
<TD></TD>
<TD>
<font face="Times New Roman" size="2"><Data ss:Type="String"><xsl:value-of select="@frm_fax"/></Data></font>
</TD>
</TR>
</TABLE>
</TD>
<TD>
<TABLE>
<TR>
<TD colspan="6" bgcolor="silver">
<font face="Times New Roman" size="3"><B><p align="center">Zlecenie Wydania</p></B></font>
</TD>
</TR>
<TR>
<TD colspan="6">
<font face="Times New Roman" size="3"><B><p align="center"><Data ss:Type="String"><xsl:value-of select="@numerDokumentu"/></Data></p></B></font>
</TD>
</TR>
<TR>
<TD>
<font face="Times New Roman" size="2">Data wystawienia:</font>
</TD>
<TD>
<font face="Times New Roman" size="2"><B><Data ss:Type="String"><xsl:value-of select="@dataWystawienia"/></Data></B></font>
</TD>
</TR>
<TR>
<TD>
<font face="Times New Roman" size="2">Data realizacji:</font>
</TD>
<TD>
<font face="Times New Roman" size="2"><B><Data ss:Type="String"><xsl:value-of select="@dataRealizacji"/></Data></B></font>
</TD>
</TR>
<TR>
<TD>
<font face="Times New Roman" size="2"><Data ss:Type="String"><xsl:value-of select="@magKod"/></Data></font>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<TABLE>
<TR><TD></TD></TR>
<TR><TD></TD></TR>
<TR><TD></TD></TR> </TABLE>
<TABLE>
<TR>
<TD></TD>
<TD>
<font face="Times New Roman" size="2">Zamawiajacy:</font>
</TD>
<TD colspan="6">
<font face="Times New Roman" size="2">Wysyłka do:</font>
</TD>
</TR>
<TR>
<TD></TD>
<TD>
ĄĄĄąą
</TD>
<TD>
s
</TD>
</TR>
</TABLE>
</Worksheet>
</Workbook>
</xsl:template>
<xsl:template match="RECORDSET1">
<xsl:apply-templates select="RECORD" mode="r1"/>
</xsl:template>
</xsl:stylesheet>
[RUN]
excel.exe