Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Excel gridlines

Reply
Thread Tools

Excel gridlines

 
 
middletree
Guest
Posts: n/a
 
      07-06-2005
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.


 
Reply With Quote
 
 
 
 
Aaron Bertrand [SQL Server MVP]
Guest
Posts: n/a
 
      07-06-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
 
 
 
Aaron Bertrand [SQL Server MVP]
Guest
Posts: n/a
 
      07-06-2005
Oh and you may want to use

TD,TH {


 
Reply With Quote
 
middletree
Guest
Posts: n/a
 
      07-06-2005
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!


 
Reply With Quote
 
Aaron Bertrand [SQL Server MVP]
Guest
Posts: n/a
 
      07-06-2005
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" <(E-Mail Removed)> wrote in message
news:uz%(E-Mail Removed)...
> 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!
>
>



 
Reply With Quote
 
middletree
Guest
Posts: n/a
 
      07-07-2005

"Aaron Bertrand [SQL Server MVP]" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView -> Excel = no gridlines Magnus Blomberg ASP .Net Datagrid Control 0 10-21-2005 04:33 PM
gridlines vertical do not work Beffmans ASP .Net 2 07-15-2005 09:06 AM
Gridlines in Datagrid problem! Lars Netzel ASP .Net 3 12-20-2004 06:23 PM
Datagrid export to Excel losing gridlines LouV ASP .Net 0 11-25-2004 04:27 PM
Hiding Gridlines of a word document Shreyas Madwanna ASP .Net 0 01-21-2004 03:04 PM



Advertisments