Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Excel s/sheet to HTML table

Thread Tools
 
Search this Thread
 
Old 12 September 2003, 01:10 PM
  #1  
Da Booga
Scooby Regular
Thread Starter
 
Da Booga's Avatar
 
Join Date: May 2002
Posts: 732
Likes: 0
Received 0 Likes on 0 Posts
Post

Hi,

I'm trying to get several tables of data in Excel into HTML tables to include in a web site. If I save the page as HTML in Excel the HTML page is (relatively) massive, this appears due to Excel saving loads of un-needed crap in the html file. I know if I typed it out by hand the file would be many times smaller than this but some of the tables are quite large.

As an example the table I tried it with is 42 rows & 7 columns, when saved as a html file it is 66k!

What's the best way to get the data across with a decent file size?

I'm using Office 2k and Dreamweaver btw.

Thanks
Old 12 September 2003, 01:19 PM
  #2  
Fatman
Scooby Regular
 
Fatman's Avatar
 
Join Date: Aug 2002
Posts: 2,390
Likes: 0
Received 0 Likes on 0 Posts
Post

If you create an empty tabel in DW, can you then paste in the data? i.e. make a 10x10 table in DW, go back to Excel and COPY a 10x10 group of cells. Highlight the whole table in DW and PASTE. Is Windows/DW clever enough to realise it's holding formatted data in the Clipboard?
Old 12 September 2003, 01:35 PM
  #3  
Da Booga
Scooby Regular
Thread Starter
 
Da Booga's Avatar
 
Join Date: May 2002
Posts: 732
Likes: 0
Received 0 Likes on 0 Posts
Post

nope

That was the first thing I tried and it simply pastes it all into one cell [img]images/smilies/mad.gif[/img]
Old 12 September 2003, 01:40 PM
  #4  
Fatman
Scooby Regular
 
Fatman's Avatar
 
Join Date: Aug 2002
Posts: 2,390
Likes: 0
Received 0 Likes on 0 Posts
Post

Sigh... I bet it works the other way around, doesn't it?

Will keep thinking...
Old 12 September 2003, 01:43 PM
  #5  
Fatman
Scooby Regular
 
Fatman's Avatar
 
Join Date: Aug 2002
Posts: 2,390
Likes: 0
Received 0 Likes on 0 Posts
Post

Here's an idea. DW has a "Clean up Word HTML" feature, doesn't it? What happens when you try to run that on this Excel-produced HTML?

The problem is that Excel dumps the file out using XML, not simple tables etc.
Old 12 September 2003, 01:47 PM
  #6  
Da Booga
Scooby Regular
Thread Starter
 
Da Booga's Avatar
 
Join Date: May 2002
Posts: 732
Likes: 0
Received 0 Likes on 0 Posts
Post

One step ahead of you

Already tried cleaning the HTML, won't work with "clean up word HTML" but there's also a "clean up HTML" feature. This did have some effect, the file is now 39k although this is still too big for my liking for what is a simple table.

Thanks for the suggestions though, keep thinking

Gareth
Old 12 September 2003, 01:51 PM
  #7  
Fatman
Scooby Regular
 
Fatman's Avatar
 
Join Date: Aug 2002
Posts: 2,390
Likes: 0
Received 0 Likes on 0 Posts
Post

OK, here's another thing to try. Save the Worksheet alone as HTML (not the whole Workbook), and make sure "add interactivity" isn't marked. The file that's created will then store the data as tables (although with A LOT of CSS formatting). You can quite easily delete out all the CSS definitions near the top of the document. The CLASS=... references in each cell you could ingnore since they probably won't cause errors and would be a pain to delete if you have lots of data.
Old 12 September 2003, 01:59 PM
  #8  
Da Booga
Scooby Regular
Thread Starter
 
Da Booga's Avatar
 
Join Date: May 2002
Posts: 732
Likes: 0
Received 0 Likes on 0 Posts
Post

That's exactly what i've done
Old 12 September 2003, 02:04 PM
  #9  
Da Booga
Scooby Regular
Thread Starter
 
Da Booga's Avatar
 
Join Date: May 2002
Posts: 732
Likes: 0
Received 0 Likes on 0 Posts
Post

DONE IT!!

It's now 7kb!

I saved the sheet as a CSV file in Excel then in Dreamweaver I went to Insert->Tabular data Here you can choose a CSV file to import.

Woohooo! Thanks for the efforts Fatman
Old 12 September 2003, 02:06 PM
  #10  
Fatman
Scooby Regular
 
Fatman's Avatar
 
Join Date: Aug 2002
Posts: 2,390
Likes: 0
Received 0 Likes on 0 Posts
Thumbs up

Nice one! I was trying to remember if DW had an import function. Glad it's sorted.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Pro-Line Motorsport
Car Parts For Sale
48
21 July 2017 09:50 PM
shorty87
Full Cars Breaking For Spares
19
22 December 2015 11:59 AM
B0DSKI
Non Car Related Items For sale
2
27 September 2015 06:58 PM
Phil3822
ScoobyNet General
3
26 September 2015 08:06 PM
shorty87
Other Marques
0
25 September 2015 08:52 PM



Quick Reply: Excel s/sheet to HTML table



All times are GMT +1. The time now is 11:31 PM.