I export data from vb.net to excel, and it discards the initial zero when it maps to excel. How can I avoid dropping the initial zero? I read the decision to add a single quote, but that makes my Excel column excellent. Users will also complain if they see a single quote in a zip code field. vb.net code
Response.AddHeader("content-disposition", attachment)
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
the stored procedure outputs XML and is converted using XSLT before being displayed on EXCEL
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<HTML>
<HEAD>
<STYLE type="text/css"> TABLE{table-layout: automatic; width:100%} .tblHeader{background-color:RGB(192,192,192);font-weight:bold} .row1{background-color:RGB(204,204,255)} .row2{background-color:RGB(153,204,255)} </STYLE>
</HEAD>
<BODY>
<TABLE border="1">
<THEAD>
<tr class="tblHeader">
<xsl:for-each select="*/*[1]/*">
<td>
<xsl:value-of select="."/>
</td>
</xsl:for-each>
</tr>
</THEAD>
<TBODY>
<xsl:for-each select="ClientArray/Client">
<TR>
<xsl:for-each select="*">
<TD>
<xsl:value-of select="."/>
</TD>
</xsl:for-each>
</TR>
</xsl:for-each>
</TBODY>
</TABLE>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
, , excel (/) .. , - excel, excel -, . excel