Excel gridlines

Discussion in 'ASP General' started by middletree, Jul 6, 2005.

  1. middletree

    middletree Guest

    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.
    middletree, Jul 6, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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.
    >
    >
    Aaron Bertrand [SQL Server MVP], Jul 6, 2005
    #2
    1. Advertising

  3. Oh and you may want to use

    TD,TH {
    Aaron Bertrand [SQL Server MVP], Jul 6, 2005
    #3
  4. middletree

    middletree Guest

    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!
    middletree, Jul 6, 2005
    #4
  5. 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" <> wrote in message
    news:uz%...
    > 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!
    >
    >
    Aaron Bertrand [SQL Server MVP], Jul 6, 2005
    #5
  6. middletree

    middletree Guest

    "Aaron Bertrand [SQL Server MVP]" <> wrote in message
    news:#...
    > 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.
    middletree, Jul 7, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shreyas Madwanna

    Hiding Gridlines of a word document

    Shreyas Madwanna, Jan 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    349
    Shreyas Madwanna
    Jan 21, 2004
  2. LouV
    Replies:
    0
    Views:
    1,089
  3. Lars Netzel

    Gridlines in Datagrid problem!

    Lars Netzel, Dec 19, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,612
    =?Utf-8?B?V2ViTWF0cml4?=
    Dec 20, 2004
  4. John 3:16

    Include gridlines when printing

    John 3:16, Dec 12, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    540
    John 3:16
    Dec 12, 2005
  5. Magnus Blomberg

    GridView -> Excel = no gridlines

    Magnus Blomberg, Oct 21, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    195
    Magnus Blomberg
    Oct 21, 2005
Loading...

Share This Page