I\'m having a hard time getting account numbers to display correctly when exporting data from database to an Excel spreadsheet. The account number for one company, shows up
This usually happens when the column is not wide enough to display the data. Try and make the column wider and see if that corrects the issue.
If you are exporting html, you could also use the xml mso schema properties to format the number as text, without changing the actual cell value ie adding an apostrophe.
<cfheader name="Content-Disposition" value="inline; filename=someFile.xls">
<cfcontent type="application/vnd.ms-excel">
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<body>
<table>
<tr>
<td style='mso-number-format:"\@";'>510074123456989</td>
</tr>
</table>
</body>
</html>
You can insert an apostrophe ' preceding the account number. This will force excel to treat numeric (any) data as text.