You might want to take a look at creating HTML. Using certain CSS information and additional attributes, you can encode enough information about data that Excel does not cripple with it.
The main idea is to mark your table data with a specific css class and define a css class, for example, a number format:
<html>
<head>
<style>
.myStyle { mso-number-format:"\@" }
</style>
</head>
<body>
<table>
<tr>
<td class="myStyle">000345</td>
</tr>
</table>
</body>
</html>
Save the file as .xls and it will open in Excel. Excel will complain about the html in the xls file, but open it anyway.
You can find the documentation download for this on MSDN:
HTML and XML Reference in Microsoft Office
source
share