About Jeff Allen Expertise I can answer basic to intermediate questions related to Classic ASP.I can answer Intermediate to Advanced questions CSS& HTML, and basic questions about JavaScript and Ajax. I can also answer questions related to web page accessibility under US Section 508.
Experience I have 8 years experience with HTML. I have been developing in ASP, VBScript and CSS for two years each. I also currently work as web developer.
Organizations IWA-HWG
Education/Credentials I have a BA in English with minors in Web Design and Scientific and Technical Writing
Expert: Jeff Allen Date: 10/12/2006 Subject: Add Gridlines in excel in asp.net
Question Hi,
I have query. How do i insert gridlines to my asp.net page. The scenario is that i have placed a html table in .aspx page with runat="server" attribute. In the backend i have given the content type as application/vnd-xls. When my page runs the html table is rendered but i am unable to get the gridlines of Excel. How do i achieve the same.
Thanks in advance
Answer If it is an HTML Table why not use a CSS rule todo this for you? Just give your table a class attribute add this rule to your CSS File (if you have one, or directly in the head of the .aspx page in question).
table.exceldata td {border: 1px solid #ccc;}
To use this add a class="exceldata" attribute to the table:
<table class="exceldata" border="0" cellspacing="0" runat="server">
...
...
</table>
If you need to place this rule intheheadof the page in question add the following just before the closing </head> tag:
<style type="text/css" media="screen">
table.exceldata td {border: 1px solid #ccc;}
</style>
and the table cells shouldbe surrounded by a light grey border.
This should force