Table of data

 
0
 

Hi all,

Can someone please help... I have a small youth football web site and would like to display the league table on a web page.

What is the best way to display this information, so that it is not to manual when i come to update the results weekly.

I have been using tables so far and then manually updating... WOW! this takes time.

Is there any way to just use excel to populate the data on the web page with out effecting the formatting.

your help would be very muh appreciated.

TiZo

 
0
 

well if you're just using html table to display the data, then you have to it that way. Enter datas manually.

If you want some automation you could explore doing it using PHP and excel.

check out this link:> http://www.ibm.com/developerworks/opensource/library/os-phpexcel/

 
0
 

Well you would go on google and type in how to make a data table online and some results would come up and you can pick which one you want to do. hope i could help.
SNIP

 
0
 

You can also (if you, or someone you know, know ASP.Net programming at all) utilize this method to read from your .xls file and use the data obtained to populate various ASP dynamic control types (gridview, etc) with the information or even use ASP Labels to populate the information in the same table you're already using.

Hope this helps :) Please mark as solved if your issue is resolved.

 
0
 

Ok, couldn't find or figure out any code for this - but tried a different route that is a good compromise.

I downloaded OpenOffice (free YAY) and then opened an Excel file in that. I saved a copy of the Excel file in an Open Document Format (so I wouldn't risk any data if it didn't work). Once opened, you can save as an HTML document. The code is SO much cleaner than Microsoft's - I could actually find the HTML tags without using the find feature.

Afterwards, I used file>open to open the html file. It allows you to edit the HTML file as a WSYWIG to fine tune anything. If you want to edit the HTML you can use View >HTML Source and toggle the option on and off - if you choose this way then you can take out the formatting and assign a style from a css stylesheet.

Another nice thing... for me at least... is the code gives you the date the content was created so you know when you made it and can double check if it is the most current.

That's the best I could find, but it is a hell of a lot easier than dealing with Microsoft's "export HTML" ::shudders::

 
1
 

Ok, came up with this - it isn't perfect but can definitely be modified to be a better fit for your site.

It is based off of using a .csv file exported from excel (this one has it in the same directory to make it easier for me to test over and over again). You have to click on the button for the output - again, just for me to test and check if things were working.

Here is a link to the posted code.

The code itself is below.

if (window.XMLHttpRequest) {
		//for firefox, opera and safari browswers
		var txtFile = new XMLHttpRequest();
	}
	if (typeof XMLHttpRequest == "undefined")
  XMLHttpRequest = function () {
    try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); }
      catch (e) {}
    try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); }
      catch (e) {}
    try { return new ActiveXObject("Msxml2.XMLHTTP"); }
      catch (e) {}
    //Microsoft.XMLHTTP points to Msxml2.XMLHTTP.3.0 and is redundant
    throw new Error("This browser does not support XMLHttpRequest.");
  };



allText = txtFile.responseText;

txtFile.open("GET","testingOne2.csv");
txtFile.send(false);




function clickyHere(){
	var allText = txtFile.responseText;
	var tableTesting = [];
	var tableTesting = allText.replace(/\n|\n^|^/g,"<tr><td>").replace(/\s+,|,|,+\s/g,"</td><td>").replace(/^\r|\r/g,"</td></tr>");
	document.write("<table border='1'>");
	document.write(tableTesting);
	document.write("</table>");
}

Hope this helps and no, I didn't test it in IE.

Attached is the .csv file resaved as a .txt (tab delimited) that can be viewed (or saved and resaved as a .csv file for testing.)

Comments
Dude better appreciate all that work :twisted: You rock!
Attachments testingOne2.txt (7.38 KB)
District	Membership 	Member Name	Title	Email Address
2	Banquete ISD	Adrian Pena	Assistant Superintendent	testEmail@emailOne.com
2	Banquete ISD	Jim Rumage	Superintendent	testEmail@emailOne.com
2	Banquete ISD	Ruben Herrera	Maintenance & Transportation Director	testEmail@emailOne.com
4	Barbers Hill ISD	Stan Frazier	Assistant Superintendenrt	testEmail@emailOne.com
5	Beaumont ISD	Laura Conway	Property & Benefits Manager	testEmail@emailOne.com
3	Beeville ISD	Roy Galvan	Environmental Director	testEmail@emailOne.com
5	Brookeland ISD	Kevin Ward	Business Manager	testEmail@emailOne.com
6	Caldwell ISD	Anita Johnson	Benefits Coordinator	testEmail@emailOne.com
7	Carthage ISD	Diana Nowell	Safety Director	testEmail@emailOne.com
10	Cedear Hill ISD	Kathy Shaw	Employee Benefits Specialist	testEmail@emailOne.com
4	Clear Creek ISD	Alice Benzaia	Director of Benefits/Risk Management	testEmail@emailOne.com
4	Clear Creek ISD	Michelle Eckles	Benefits Coordinator	testEmail@emailOne.com
4	Clear Creek ISD	Julie Frame	Safety & Training Coordinator	testEmail@emailOne.com
4	Clear Creek ISD	Sharon McHenry	Workers's Compensation Specialist	testEmail@emailOne.com
19	Clint ISD	Pending		testEmail@emailOne.com
19	Clint ISD	Pending		testEmail@emailOne.com
19	Clint ISD	Pending		testEmail@emailOne.com
19	Clint ISD	Pending		testEmail@emailOne.com
19	Clint ISD	Pending		testEmail@emailOne.com
6	College Station ISD	Randell Tullos	Risk Manager 	testEmail@emailOne.com
2	Corpus Christi ISD	Clark Adkins	Director Benefits & Risk Management	testEmail@emailOne.com
2	Corpus Christi ISD	Laurel S. Ferri	Administrative Officer	testEmail@emailOne.com
10	Denton ISD	Sally Havey	Benefits Director	testEmail@emailOne.com
10	Ennis ISD	Julie Moreno	Benefits Manager	testEmail@emailOne.com
10	Ennis ISD	Kris Farmer	Personnel Secretary	testEmail@emailOne.com
10	Ennis ISD	Lisa Fincher	Assistant Superintendent	testEmail@emailOne.com
10	Ennis ISD	Richard Skuza	Deputy Superintendent of Schools	testEmail@emailOne.com
10	Ennis ISD	Ross Jones	Police Chief	testEmail@emailOne.com
4	Fort Bend ISD	Dorine Craig	Benefits/Risk Management	testEmail@emailOne.com
4	Goose Creek ISD	Wallace Vosloh	Risk Manager 	testEmail@emailOne.com
4	HCCS	Gwen Drumgoole	Risk Manager 	testEmail@emailOne.com
1	Hidalgo ISD	Alvin Samano	Executive Operations Director	testEmail@emailOne.com
1	Hidalgo ISD	Edward Blaha	Superintendent	testEmail@emailOne.com
1	Hidalgo ISD	Guillermo Ramirez	Purchasing Director	testEmail@emailOne.com
1	Hidalgo ISD	Ignacio Amezcua	Purchasing Specialist	testEmail@emailOne.com
1	Hidalgo ISD	Juan Trevino	Operations Director	testEmail@emailOne.com
4	Huffman ISD	Sonya George	Assistant Superintendent Business	testEmail@emailOne.com
4	Huffman ISD	Charlie Miller	Maintenance Coordinator	testEmail@emailOne.com
4	Huffman ISD	Shannon Jones	Executive Director Secretary	testEmail@emailOne.com
4	Huffman ISD	Cheryl Taylor	Benefits Specialist	testEmail@emailOne.com
4	Huffman ISD	Doug Wade	Maintenance Supervisor	testEmail@emailOne.com
4	Humble ISD	Stephen Cooper	Director Safe & Secure Schools	testEmail@emailOne.com
4	Humble ISD	Martha Buckner	Assistant Superintendent Support Services	testEmail@emailOne.com
4	Humble ISD	Deborah Yocham	Facility Planning & Construction	testEmail@emailOne.com
10	Kemp ISD	Sam Swiervc	Assistant Superintendent	testEmail@emailOne.com
4	La Porte ISD	David Drake	Assistant Superintendent	testEmail@emailOne.com
1	Mercedes ISD	Olga Hinds	CFO	testEmail@emailOne.com
1	Mercedes ISD	Suzanne Ramirez	Purchasing Supervisor	testEmail@emailOne.com
1	Mercedes ISD	Edward Churchill	Safe School Coordinator	testEmail@emailOne.com
1	Mercedes ISD	Virginia Davila	Payroll Clerk	testEmail@emailOne.com
1	Mercedes ISD	Manuela Vasquez	Employee Benefits Clerk	testEmail@emailOne.com
5	Nederland ISD	Michael Laird	Assistant Superintendent Personnal	testEmail@emailOne.com
4	Needville ISD	Jennifer Michalec	Accounts Payable/Workers' Comp	testEmail@emailOne.com
4	Needville ISD	Dovie Brown	Business Manager	testEmail@emailOne.com
4	Needville ISD	Curtis Rhodes	Superintendent	testEmail@emailOne.com
6	New Caney ISD	Jamie Dickinson	Human Resources Specialistq	testEmail@emailOne.com
6	New Caney ISD	Jim Grant	Assistant Superintendent	testEmail@emailOne.com
6	New Caney ISD	Jon Kramer	Executive Director H.R.	testEmail@emailOne.com
6	New Caney ISD	Mike Aston	Director of Support Services	testEmail@emailOne.com
6	New Caney ISD	Morris Fuselier III	Associate Superintendent	testEmail@emailOne.com
20	Northside ISD	Anna-Marie Rizo	Employee Benefits Communications Specialist	testEmail@emailOne.com
20	Northside ISD	Carol Sauceda	Claims Specialist	testEmail@emailOne.com
20	Northside ISD	Cecil Tatum	Director of Benefits/Risk Management	testEmail@emailOne.com
20	Northside ISD	Dalia Hernandez	Employee Benefits Program Specialist	testEmail@emailOne.com
20	Northside ISD	Debby Glass	Risk Management Coordinator	testEmail@emailOne.com
20	Northside ISD	Teri Giese	Employee Benefits Advisor	testEmail@emailOne.com
20	Northside ISD	Lela Worthan	Safety Specialist	testEmail@emailOne.com
20	Northside ISD	Mark Hardison	Employee Benefits Coordinator	testEmail@emailOne.com
20	Northside ISD	Raquel Garza	Risk Management Advisor	testEmail@emailOne.com
20	Northside ISD	Robin Clark	Employee Retirements	testEmail@emailOne.com
18	Odessa College	Betty George	Dean of Administration	testEmail@emailOne.com
18	Odessa College	Craig Robertson	Health Safety Specialist	testEmail@emailOne.com
20	Randolph Field ISD	Hossiny Moharam	Director of Maintenance	testEmail@emailOne.com
20	Randolph Field ISD	Lorrie Remick	Chief Financial Officer	testEmail@emailOne.com
20	Randolph Field ISD	Billy Walker	Superintendent	testEmail@emailOne.com
20	Randolph Field ISD	Angela White	Payroll Director	testEmail@emailOne.com
20	Randolph Field ISD	Bruce Cannon	HS Principal	testEmail@emailOne.com
2	Ricardo ISD	Bettinae Kaiser	Director of Business	testEmail@emailOne.com
10	Richardson ISD	Julia Dee-Ann Spain	Workers' Compensation Coordinator	testEmail@emailOne.com
10	Richardson ISD	Tony Harkleroad	Assistant Superintendent Finance	testEmail@emailOne.com
10	Royse City ISD	James Dodson	Associate Superintendent	testEmail@emailOne.com
10	Royse City ISD	Terry Young	Safety Director	testEmail@emailOne.com
10	Royse City ISD	Debra Summers	Benefits Specialist	testEmail@emailOne.com
10	Royse City ISD	Peggy Web	Administrative Assistant	testEmail@emailOne.com
10	Royse City ISD	Sharon Norris	Payroll Clerk	testEmail@emailOne.com
2	Sinton ISD	George S. Hernandez	Assistant Superintendent Business	testEmail@emailOne.com
2	Sinton ISD	Donald Mercier	Maintenance Director	testEmail@emailOne.com
2	Sinton ISD	Isidro Reyna	Transportation Director	testEmail@emailOne.com
2	Sinton ISD	Anita Martin	Accounts Payable Clerk	testEmail@emailOne.com
2	Sinton ISD	Elena Sanchez	Accountants Payable Clerk	testEmail@emailOne.com
4	Stafford MSD	Lucas Jonda	Business Manager	testEmail@emailOne.com
4	Stafford MSD	Teresa Sazendt	Accountant/Payable Clerk	testEmail@emailOne.com
4	Stafford MSD	Diane Chapman	Accounts Receivable Clerk	testEmail@emailOne.com
4	Stafford MSD	Elizabeth Abrego	Payroll Specialist	testEmail@emailOne.com
4	Stafford MSD	Emma Trevino	HR Clerk	testEmail@emailOne.com
8	Texrkana ISD	Chris Lyber	Risk Management Tech	testEmail@emailOne.com
8	Texrkana ISD	Georgette Duke	Director of Risk Management	testEmail@emailOne.com
13	TXSRMA 	Michelle Lewis	Director	testEmail@emailOne.com
7	Tyler ISD	Bruce Ballard	Purchasing/Risk Manager	testEmail@emailOne.com
4	University of Houston 	Edward Arias	Environmental Director	testEmail@emailOne.com
 
0
 

Many thanks for looking into this, i will be revamping the web page shortly, so i will let you know how it goes
*************************************************************************************

Ok, came up with this - it isn't perfect but can definitely be modified to be a better fit for your site.

It is based off of using a .csv file exported from excel (this one has it in the same directory to make it easier for me to test over and over again). You have to click on the button for the output - again, just for me to test and check if things were working.

Here is a link to the posted code.

The code itself is below.

if (window.XMLHttpRequest) {
		//for firefox, opera and safari browswers
		var txtFile = new XMLHttpRequest();
	}
	if (typeof XMLHttpRequest == "undefined")
  XMLHttpRequest = function () {
    try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); }
      catch (e) {}
    try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); }
      catch (e) {}
    try { return new ActiveXObject("Msxml2.XMLHTTP"); }
      catch (e) {}
    //Microsoft.XMLHTTP points to Msxml2.XMLHTTP.3.0 and is redundant
    throw new Error("This browser does not support XMLHttpRequest.");
  };



allText = txtFile.responseText;

txtFile.open("GET","testingOne2.csv");
txtFile.send(false);




function clickyHere(){
	var allText = txtFile.responseText;
	var tableTesting = [];
	var tableTesting = allText.replace(/\n|\n^|^/g,"<tr><td>").replace(/\s+,|,|,+\s/g,"</td><td>").replace(/^\r|\r/g,"</td></tr>");
	document.write("<table border='1'>");
	document.write(tableTesting);
	document.write("</table>");
}

Hope this helps and no, I didn't test it in IE.

Attached is the .csv file resaved as a .txt (tab delimited) that can be viewed (or saved and resaved as a .csv file for testing.)

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: