Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: Help: HTML Table not displaying full text

Reply
Thread Tools

Re: Help: HTML Table not displaying full text

 
 
_rg_rg_
Guest
Posts: n/a
 
      11-13-2003
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" <(E-Mail Removed)> a écrit dans le message de
news:lCQsb.767$(E-Mail Removed)...
> Jedi wrote:
>
> > When I export from Excel to static HTML

>
> That's your problem.



 
Reply With Quote
 
 
 
 
Leif K-Brooks
Guest
Posts: n/a
 
      11-13-2003
Jedi wrote:

> When I export from Excel to static HTML


That's your problem.
 
Reply With Quote
 
 
 
 
Jedi
Guest
Posts: n/a
 
      11-13-2003
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" <(E-Mail Removed)> wrote in message
news:lCQsb.767$(E-Mail Removed)...
> Jedi wrote:
>
> > When I export from Excel to static HTML

>
> That's your problem.



 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      11-13-2003
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

 
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
Displaying oracle table in jsp as a html table Sameer Java 1 10-26-2007 01:17 PM
Options for generic full-text search without using database-specific full-text engine? Samuel R. Neff ASP .Net 2 06-10-2005 06:53 PM
HTML Encoded Text not displaying in XSLT xanthviper@xanthviper.com XML 3 04-26-2005 05:32 PM
Displaying text in an asp.net table =?Utf-8?B?Q3JhaWcgSEI=?= ASP .Net 2 12-10-2004 08:09 AM
Could not load type VTFixup Table from assembly Invalid token in v-table fix-up table. David Williams ASP .Net 2 08-12-2003 07:55 AM



Advertisments