CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Excel Format

  1. #1
    Join Date
    Jul 2006
    Posts
    141

    Excel Format

    Hi All,

    I need to export data to excel and arrange the data according to column1.

    I should group the data by column1 and draw a line fo reach group.

    The excel format should look like below:

    ------------------------------------------------ (this is the line i need to draw)
    Column1 Column2 Column3
    x1
    x1
    x1
    -----------------------------------------------(this is the line i need to draw)
    x2
    x2
    x2
    ------------------------------------------------(this is the line i need to draw)


    I am able to group the data but not able to draw the line by group...
    Does anyone has any idea on this?

    Help please!!

  2. #2
    Join Date
    Jul 2006
    Posts
    141

    Re: Excel Format

    Hi my code is as below:

    Code:
     Response.Write("<table>")
    
      Response.Write("<tr>")
         Response.Write("<td>")
            Reponse.Write("Value1")
         Response.Write("</td>")
    
         Response.Write("<td>")
            Reponse.Write("Valuex2")
         Response.Write("</td>")
    
       Response.Write("</tr>")
     Response.Write("</table>")
    The excel format should look like below:

    ------------------------------------------------ (How to draw this line?)
    Column1 Column2 |
    Value1 Valuex2 |
    Value1 Valuey2 |
    Value1 Valuez2 |
    -----------------------------------------------( How to draw this line?)
    Value3 Valuex3 |
    Value3 Valuey3 |
    Value3 Valuez3 |
    --------------------------------------------------------

    Does anyone has idea on this?

  3. #3
    Join Date
    Jul 2005
    Location
    Louisville, KY
    Posts
    201

    Re: Excel Format

    So are you just wanting a border on just the bottom or top of cells? or does it have to extend over to the sides?

    I would suggest using CSS,

    .... and apply the style to the table

    border-bottom-style: solid;
    border-bottom-color: black;
    border-bottom-width: 3px;


    border-top-style: solid;
    border-top-color: black;
    border-top-width: 3px;

    etc.

    If you've never done CSS, I'd suggest googling something such as border-bottom-style css -- and go to the w3schools css site for reference. It's got lots of samples.

    If this post helps, please feel free to rate it up.

    Thanks,
    Quinn

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured