?
Solved

HTML Table Problem w/ Microsoft Excel Imports

Posted on 2004-08-24
3
Medium Priority
?
213 Views
Last Modified: 2012-05-05
Hello there,

I run a website for a JR Hockey league.  I wrote it mostly by hand, no
HTML editor.  So the code may be sloppy :-)

It uses a number of include file.  Basically an shtml file pulls in:

-Header file
-Navigation bar
-Main data
-Footer file

The "main data" for the site comes from Microsoft Excel, using the
Publish as Webpage feature.

The pages use a number of tables.  I'm having a problem with the
alignment of one of the cells.   If you look at
http://www.empirehockey.com/teams.shtml you can see how I want it to
look.  Notice how the navigation bar is aligned at the top of the page
(and the top of a table row)??

Now look at what happens when the Microsoft Excel data is long.
http://www.empirehockey.com/schedule.shtml  The navigation bar gets
pushed to the bottom.

I've used td valign=top for that cell but it doesn't do any good.  I
also can't find any glaring table errors, but obviously I have one
somewhere.

One note is that I can't control the format of what Microsoft Excel
exports.  It includes more tables, and even HTML and BODY tags.  I
know that's sloppy but it seems to work, and I can't change that part.

Any idea what I can do in my code to force my navigation bar to always
be top aligned?

Thanks!!!!!!
Shane
0
Comment
Question by:shanepresley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
flow79 earned 150 total points
ID: 11885182
first, I just want to say (other than the menu alignment) - Great looking site!  I really like it.  

However, I think you already know what your problem is.  and that is the multiple heads and bodys in your html.  They will throw off the layout to an extreme degree.

I hate to say this, but it may be time to learn ASP or PHP (and how to use a database) - that way you store your data in the DB, not excel.  (or you can write ASP functions to export the excel data in a properly coded manner).

your code is over 5500 lines long (way too much to try to sift through).  I know its a huge pain, but I would say your best bet (other than correcting it, line by line) would be to learn ASP and DBs.

good tutorials can be found at:
http://www.w3schools.com/asp/default.asp
http://www.spoono.com/asp/
http://www.asptutorial.info/
http://www.aspin.com/
http://www.aspfree.com/

or ask questions in the ASP TA here on EE.

Good luck!
0
 
LVL 1

Author Comment

by:shanepresley
ID: 11885819
Yea, I did a little more digging, and found the problem.  You were on the right track.  It's not specifically the html or body tags.  It was that Excel was adding a <style> tag, where it defined vertical-align:bottom;

That caused my cells to be bottom aligned.  I was able to change that behavior in Excel, by just formatting the cells to be top aligned.

Yes, I agree, it's messy.  I think you're right, ASP is the way to go.  But at the moment there are so many calculations done in Excel by our stats people, that I don't want to rewrite that in ASP.   So I'm glad I was able to solve this problem for now.  But in the future I'll try to learn ASP.  Thanks for your help!
0
 
LVL 13

Expert Comment

by:flow79
ID: 11885980
Just for your future reading, ASP does have a technique to import data directly from Excel.

http://www.devasp.com/search/display/category826.html

http://www.greggriffiths.org/webdev/both/excel/

http://www.devasp.com/search/res/r23914.html

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question