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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel (cell format) via ASP

Status
Not open for further replies.

gba

Programmer
Dec 17, 2001
11
CA
Using ASP to output a table to an Excel spreadsheet file using the following method:

<% Response.ContentType=&quot;application/vnd.ms-excel&quot;%>

This works, the excel file is created and populated etc... Problem I'm having is that I have one cell that contains a long string of text that is wrapping inside the Excel cell,instead of the cell expanding to accommodate the string on one line.

Things I've tried:
- the string contains no CR/LF characters and looks fine from within MS-Access (source)
- Tried expanding the width of the cell in the ASP/HTML code (<td> width=100>) .
- used ' CELLSPACING=1 CELLPADDING=1' in the table line (which actually solved wrap
in other cells)
- increase the width in the MS-Access table to show entire line (reaching here).

anyone have any ideas... thnx

 
SWAG, but try adding the NOWRAP attribute to the cell:

<TD NOWRAP>My Long String</TD> Jon Hawkins
 
Thanks .... never even thought of that...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top