|Inserting Excel table into html without losing looking|
And don't have those junk coding
I have a lot of tables in Excel that I want to put on my web site. When I try to save them with Excel the result file look my table format, but the code is loaded with a lot of css. The file is about 17k in size with just one table on it.
Is there a better way to import Excel tables into a html file?
Save your excel file as a CSV file. In Dreamweaver there's a command to import tabular data.
You won't be able to format in excel and translate the formats directly to the html table...
If you already have the table pasted w/ all the spammy MS code, you can clear all table , tr, td attributes and apply your own by hand coding... MS probably applies it's funky CSS to every <td> tag, when you could probably just apply to the whole table.
I don't have Dreamweaver. Even if i had it, when you save to csv file, you loose all the colors and fonts.
Well, the formats aren't going to translate very well. Taking MS anything and putting it on the web is mostly a matter of stripping all the MS gobbledygook out of it you can. At least that's been my experience.
I work with excel a lot, and my best labor saving solution has been to put all of it into a mysql database and spit it back out as needed.
As soon as I find another spreadsheet that can import data AND has a text to columns command - I'll happily quit using excel. :)
That conversion into Database and back sounds good-- problem is, I have employees send me email asking me to convert their files, used for document reasons -- non data, with a lot of decoration work from excel to html format. Is there any program else than HTML-kit that can do it? HTML-kit does superb job in getting rid of Word 2000 surplus tag flags allowing me to add my own css file. Excel is the only one that is gnawing off my back.
You have a part of the solution. Copy and paste form Excel to Word. And use what you call a html-kit that handle css. But what html-kit?
Problem is -- I recieve about 5 to 10 excel spreadsheets to convert into html format everyday at where I work... I often had to do manual and am looking for better ways to convert 'em.
When I converted, pasted or what'snot from excel into word, design superbly changed forcing me to go into manual.
*sigh* Wish they used Word format instead of Excel -- thus making things awfully easier for me.
Well, in my dealings, it's always been data. I have taken people's beautiful spreadsheets and turned them into plain old data many times.
I have done the word to HTML thing a few times, and Word produces some pretty nasty code... but you are right in that Excel is far worse... almost impossible to fix.
Pasting into word might help, but it's really MS interpretation of table css that's the problem.
Take a look here: exceleverywheredotcom
[edited by: caine at 8:59 pm (utc) on Feb. 11, 2004]
[edit reason] no direct urls - against tos [/edit]
The BEST way to get Excel or Word files into FrontPage without all the added CSS junk (eg, MSO stuff) is to use the FP "Insert File" command (located on the Insert menu). This will place your Word text or Excel table into the page with almost NO formatting (and especially no bloated CSS code). It gives you [u]almost[/u] pure text, but what little formatting remains is very easy to strip out. Then just format the page the way you want. Believe me, it's MUCH easier than cut-and-paste or going the CSV route. Saving the Word or Excel file directly as an HTML page was meant, I believe, to allow the page to be "interactive" on the site or provide a "round-trip" option. Unless you intend to use the page on your site that way, I would NEVER save these files as an HTML page. Too much bloated code, as you discovered.
I simply take a screenshot of the file or table I want
to copy, then I Crop it and paste the image file into my webpage,
it looks better than the original. No goofing around with data.
Hope this helps,
I had a spread sheet of group of web sites for a specialized directory, not necessarily in the order I wanted the columns on the web page table.
I built a single entry in MS word typing in the <p>, </p>, etc tags. In Word I used mail merge and replaced the words "title" etc. with merge fields. I then did a merge using the spread sheet as a data source and using the "directory" option in mail merge. That produced a table, with the <tr>, <td>, etc. tags with one row for each row in the spread sheet. Everything was perfectly clean. By putting in the html tags for a link I was able to make the cells with URLs actual links.
The resulting Word page looked like:
<p>«title»<a href="http://«url»"> «url»</a><br>«Description»</p>
I then copied the page from Word and pasted in the desired location in Front Page, using the HTML tab.
I did the same with a table of people, contact info, e-mail addresses, and made a table by typing the <tr>, <td> etc. tags into word.