Formatting HTML Tables for Excel

kabalababa

New Member
Hey guys so i have a page in asp that makes a xls table, however when open the table all the rows are stuffed into the default column width which i would like to set.My table looks something like this\[code\]<table><thead>'A for loop makes a series of th </thead>'another loop pulls db values<tr><td>value1</td><td>value2</td> 'etc </tr></table>\[/code\]I have tried the following to set the space
  • width="3.29in"
  • &nsp; spam (barbaric but sometimes effective)
  • width="400px"
none of the above seem to work.Additionally here is my header asp incase its relevant\[code\]Response.Clear()Response.Buffer = FalseResponse.ContentType = "application/vnd.ms-excel"Response.AddHeader "Content-Disposition", "atachment; filename=blah.xls"\[/code\]Also on a side note for some reason when i have a dollar value printed as such\[code\]<td>$<%=dbvalue%></td>\[/code\]for some reason this yields '$dollar value and i am not sure how to nuke the single quote.
 
Back
Top