Solved

HTML Table Problem w/ Microsoft Excel Imports

Posted on 2004-08-24
3
207 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SVG Logo 4 31
Simple Angular 2 login page 4 71
Could you point a way to form a view's combo based on Codeigniter's results? 4 16
Objects on Same Line 2 16
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
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 …
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 basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now