By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,710 Members | 1,626 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,710 IT Pros & Developers. It's quick & easy.

Excel gridlines

P: n/a
Like many people here, I've been trying to generate a spreadsheet on an ASP
page. In my case, it's Intranet, so I can't provide you with a link. But the
problem I have been fighting is a simple one: The spreadsheet that is built
by my code has no gridlines. I cannot find anything in the documentation of
either MSDN (for ASP) or Excel that tells me how to code my page in such a
way that it looks like Excel normally looks when you bring it up.

In my HTML code, I have tried

<table border="1"

as well as just taking the border attribute out. I have seen this work in
other people's ASP code, but don't have access to their code. Any help
appreciated.
Jul 22 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
There's probably a more efficient way to do this these days, but I still
tend to use my old standby:

<style>
TABLE { border-left:1px solid #cccccc; border-top:1px solid #cccccc }
TD { border-right:1px solid #cccccc; border-bottom:1px solid #cccccc }
..noborder { border:0px }
</style>

If you have other tables that you *don't* want the style to apply to, then
depending on which is more work, you can create a separate style and in the
one with less work you can say <table class='noborder'><tr><td
class='noborder'>...</td></tr></table> ... or swap it around and make
..TableBorder and .TDBorder classes.

A

"middletree" <mi********@verywarmmail.com> wrote in message
news:eG**************@TK2MSFTNGP10.phx.gbl...
Like many people here, I've been trying to generate a spreadsheet on an
ASP
page. In my case, it's Intranet, so I can't provide you with a link. But
the
problem I have been fighting is a simple one: The spreadsheet that is
built
by my code has no gridlines. I cannot find anything in the documentation
of
either MSDN (for ASP) or Excel that tells me how to code my page in such a
way that it looks like Excel normally looks when you bring it up.

In my HTML code, I have tried

<table border="1"

as well as just taking the border attribute out. I have seen this work in
other people's ASP code, but don't have access to their code. Any help
appreciated.

Jul 22 '05 #2

P: n/a
Oh and you may want to use

TD,TH {
Jul 22 '05 #3

P: n/a
Thanks; it looks good, and I gave it a try and looks better than what I was
working with after I made my post, so I'll go with it.

You da man!
Jul 22 '05 #4

P: n/a
No problem. A nice added touch is to fine-tune the padding and the typeface
used. More of a CSS question than an ASP one, though...


"middletree" <mi********@verywarmmail.com> wrote in message
news:uz****************@TK2MSFTNGP09.phx.gbl...
Thanks; it looks good, and I gave it a try and looks better than what I
was
working with after I made my post, so I'll go with it.

You da man!

Jul 22 '05 #5

P: n/a

"Aaron Bertrand [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:#4**************@tk2msftngp13.phx.gbl...
No problem. A nice added touch is to fine-tune the padding and the typeface used. More of a CSS question than an ASP one, though...


I realize that, but originally, I was hoping there was a way in ASP to set
some Excel properties.
Jul 22 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.