Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format Field To Text When Downloading Into Excel

Status
Not open for further replies.

FontanaS

Programmer
May 1, 2001
357
US
Hi,

I am downloading a report automatically into excel.
There is one field that is causing me a problem.
It is a text field in the database but some of the values start with a 0 (zero). When it is inserted into excel the 0 (zero) dissapears. I can't find a FormatText function. Is there a function that I can use that will make sure the field is treated as text?

The line of code is -
<td align="left"><font face="Tahoma" size="2"><%=RsRed("ChapterProjectNumber")%></font></td>

THANKS!

 
It would be an ugly hack but you could print the value so that Excel treats it as a function that returns a text string.

What I mean is, instead of [red][tt]012345[/tt][/red], you would put [red][tt]="012345"[/tt][/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top