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
Solved

HTML Table Problem w/ Microsoft Excel Imports

Posted on 2004-08-24
3
210 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
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
flow79 earned 50 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article discusses four methods for overlaying images in a container on a web page
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

828 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