Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

In classic ASP exporting a table to Excel, how do I preset an Excel column width?

Avatar of tom_burkhardt
tom_burkhardtFlag for United States of America asked on
ASPMicrosoft Excel
3 Comments1 Solution1275 ViewsLast Modified:
hi experts,
I have a Classic ASP page which takes data from a database and displays it dynamically as an HTML table.
The table is exported to an Excel file using this code:
      Response.ContentType = "application/vnd.ms-excel"
      Response.AddHeader "Content-Disposition", "attachment; filename=" & sndName & ".xls"
where sndName is the name I've assigned to the Excel file.

What I need is to preset one of the column widths to a value in Excel of 100.

I've tried doing it by setting the HTML width
both with <td width="100">
and also with <td style="width:100pt;">
but this does not seems to work.

Can anyone help me with this?
ASKER CERTIFIED SOLUTION
Avatar of Robin
RobinFlag of Netherlands imageSoftware Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers