Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: open
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?
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 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.
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.
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.
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.