Re: Help: HTML Table not displaying full text

Discussion in 'HTML' started by _rg_rg_, Nov 13, 2003.

  1. _rg_rg_

    _rg_rg_ Guest

    All i have already experienced with exporting html from office give in the

    best case aproximate results. In worth cases, html page is unreadable. I

    didn't find any built in solution. So i wrote a macro code like the

    following.

    This will give you a nice dressed and well aligned web page with ALL text in

    it. You can safely change all parameters.

    For example, if you want to see Excel grid, change border=0 to border=1,

    etc...





    public sub PublieHtml()

    Dim HTML As Integer

    Dim i as Long, j as Long

    HTML = FreeFile

    Open ActiveSheet.Name & ".html" For Output As HTML

    Print #HTML, "<html>"

    Print #HTML, "<head>"

    Print #HTML, " <title>";ActiveSheet.Name;"</title>"

    Print #HTML, "</head>"

    Print #HTML, "<body>"

    Print #HTML, " <P><TABLE cellSpacing=1 cellPadding=1 border=0>"

    For j=1 to UsedRange.Rows.Count

    Print #HTML, " <TR>"

    For i=1 to UsedRange.Columns.count

    print #HTML, " <TD>" ; Cells(j,i).Text ; "</TD>"

    Next i

    Print #HTML, " </TR>"

    Next j

    Print #HTML, " </TABLE></P>"

    Print #HTML, "</body>"

    Print #HTML, "</html>"

    Close #HTML

    End Sub

    "Leif K-Brooks" <> a écrit dans le message de
    news:lCQsb.767$...
    > Jedi wrote:
    >
    > > When I export from Excel to static HTML

    >
    > That's your problem.
     
    _rg_rg_, Nov 13, 2003
    #1
    1. Advertising

  2. Jedi wrote:

    > When I export from Excel to static HTML


    That's your problem.
     
    Leif K-Brooks, Nov 13, 2003
    #2
    1. Advertising

  3. _rg_rg_

    Jedi Guest

    Great, so do you have any code that can export normal HTML?

    I've got an Acess table that I need to output. Currently, I just move each
    row to the cell and then publish...

    Bodi

    "Leif K-Brooks" <> wrote in message
    news:lCQsb.767$...
    > Jedi wrote:
    >
    > > When I export from Excel to static HTML

    >
    > That's your problem.
     
    Jedi, Nov 13, 2003
    #3
  4. Jedi wrote:

    > I've got an Acess table that I need to output. Currently, I just move each
    > row to the cell and then publish...


    One fancy trick I've heard of is to take your spread sheet, add a new
    column at the front containing:

    <tr><td>
    <tr><td>
    <tr><td>
    .... etc ...

    and one at the end containing:

    </td></tr>
    </td></tr>
    </td></tr>
    .... etc ...

    and then *between* each of your regular data columns:

    </td><td>
    </td><td>
    </td><td>
    .... etc ...

    So that a table like this:

    Month Days
    July 31
    Feb 28.25
    Nov 30

    becomes:

    <tr><td> Month </td><td> Days </td></tr>
    <tr><td> July </td><td> 31 </td></tr>
    <tr><td> Feb </td><td> 28.25 </td></tr>
    <tr><td> Nov </td><td> 30 </td></tr>

    Then export the file as tab-seperated values.

    That should get you close.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Nov 13, 2003
    #4
    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. =?Utf-8?B?Q3JhaWcgSEI=?=

    Need help displaying text in an asp.net table

    =?Utf-8?B?Q3JhaWcgSEI=?=, Dec 10, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    573
    =?Utf-8?B?Q3JhaWcgSEI=?=
    Dec 11, 2004
  2. Samuel R. Neff
    Replies:
    2
    Views:
    610
    bradley
    Jun 10, 2005
  3. Replies:
    3
    Views:
    1,102
  4. Sameer
    Replies:
    1
    Views:
    790
  5. Replies:
    1
    Views:
    190
    Ken Bloom
    May 28, 2007
Loading...

Share This Page