| Welcome to Webforumz.com. |
|
Apr 16th, 2008, 20:49
|
#1 (permalink)
|
|
New Member
Join Date: Jul 2007
Location: Sutton
Age: 47
Posts: 8
|
League Table From Notepad
Can anyone please help with uploading League Tables that are sent to me in a Notepad.txt file.
Every week I receive a list of results and league tables in a Notepad file that in Notepad are all in line and easily readable but when pasted in to an html file via Front Page the table looses its format and is all out of line.
I know how to make tables from scratch but as I receive over 24 league tables per weekend it would be much appreciated if someone knows how to enter the Notepad text, to keep the table format.
The table appears as follows via Front Page but looks perfect in Notepad.
Team P W D L F A Pts
Team 1 FC 12 10 1 1 55 12 31
Team 2 FC 10 9 1 0 43 7 28
Team United FC 11 7 1 3 46 12 22
Team RANGERS FC 14 5 5 4 33 24 20
Team City 13 5 2 6 35 36 17
Team TOWN COLTS 12 4 3 5 34 20 15
Team FC 14 4 2 8 25 48 14
Team COLTS. 15 3 2 10 18 67 11
Team WEL TIGERS. 13 1 1 11 11 74 4
Any help would be appreciated.
|
|
|
Apr 16th, 2008, 21:49
|
#2 (permalink)
|
|
Highly Reputable Member
Join Date: Oct 2007
Location: Stockport
Age: 16
Posts: 738
|
Re: League Table From Notepad
Could you not just use a template and copy and paste them into that?
|
|
|
Apr 16th, 2008, 23:30
|
#3 (permalink)
|
|
Up'n'Coming Member
Join Date: Mar 2008
Location: Chester, UK
Age: 17
Posts: 89
|
Re: League Table From Notepad
i didn't think notepad had any formating? i thought it was a wordpad thing.
The easiest thing would be a simple php script for updating, if your server supported that... it'd probably be about tutorial 6ish on any beginners guides to php.
Failing that you just need to do a little bit of extra leg work...
However i have no experience using front page... have you tried doing it manually? i know front page has tons of issues with the code it outputs.
Can you submit the html code generated by front page?
So we can see exactly what it's doing with its code?
You might be better c&p it into word, and format it, i'm pretty sure formatting in word can be copied/pasted.
|
|
|
Apr 17th, 2008, 00:53
|
#4 (permalink)
|
|
Head Admin & CEO
Join Date: Jul 2003
Location: bug busting new style
Age: 34
Posts: 3,311
|
Re: League Table From Notepad
the editor is irrelevant. You are sent these weekly in plain text and NOT html....
Therin lies your problem. either convert them to an HTML table yourself or have the person make a table and send you the HTML.
__________________
Rob Collyer - SEO Specialist (8 years+)
Owner & Founder of Webforumz.com
My Mrs's site:- Student Midwife Forums
I am currently unavailable for private work
-------------------------------------------------
|
|
|
Apr 17th, 2008, 17:14
|
#5 (permalink)
|
|
Up'n'Coming Member
Join Date: Mar 2008
Location: Chester, UK
Age: 17
Posts: 89
|
Re: League Table From Notepad
Some editors adapt the syles tho, for example if you copy text of the internet
into word it keeps the styling, unlike some editors or older versions of word, however it would only work in reverse with a wysiwyg editor, and probably not all of them.
|
|
|
Apr 17th, 2008, 18:43
|
#6 (permalink)
|
|
New Member
Join Date: Jul 2007
Location: Sutton
Age: 47
Posts: 8
|
Re: League Table From Notepad
Thanks for everyones input.
Unfortunately I have tried copy and pasting in to Word and saving as an html file and several other options, but Notepad does not hold any useful formatting at all.
The tables look good in Notepad but once transferred to an html document all table formatting is lost.
I will look at the php scripts as suggested to see if suitable. Its a shame as what is only a 2 min job with c&p, actually changing into proper tables for 20 leagues would take hours, unless anyone knows different!
|
|
|
Apr 17th, 2008, 20:36
|
#7 (permalink)
|
|
Up'n'Coming Member
Join Date: Apr 2008
Location: Or-Yehuda, Israel
Age: 60
Posts: 88
|
Re: League Table From Notepad
It should be quite easy.
One thing maybe will make it a little easier, get an editor like Note Tab Light that shows end of line too.
Then follow these steps:
1. Copy your text into Note Tab Light as is.
- Code: Select all
Team P W D L F A Pts
Team 1 FC 12 10 1 1 55 12 31
Team 2 FC 10 9 1 0 43 7 28
Team United FC 11 7 1 3 46 12 22
Team RANGERS FC 14 5 5 4 33 24 20
Team City 13 5 2 6 35 36 17
Team TOWN COLTS 12 4 3 5 34 20 15
Team FC 14 4 2 8 25 48 14
Team COLTS. 15 3 2 10 18 67 11
Team WEL TIGERS. 13 1 1 11 11 74 4
2. Make the Teams into a single string by connecting the separate words with an _ (there is method in my madness)
- Code: Select all
Team P W D L F A Pts
Team_1_FC 12 10 1 1 55 12 31
Team_2_FC 10 9 1 0 43 7 28
Team_United_FC 11 7 1 3 46 12 22
Team_RANGERS_FC 14 5 5 4 33 24 20
Team_City 13 5 2 6 35 36 17
Team_TOWN_COLTS 12 4 3 5 34 20 15
Team_FC 14 4 2 8 25 48 14
Team_COLTS. 15 3 2 10 18 67 11
Team_WEL_TIGERS. 13 1 1 11 11 74 4
3. With the REPLACE TEXT function replace " " (empty space) with "</td><td>"
- Code: Select all
Team</td><td>P</td><td>W</td><td>D</td><td>L</td><td>F</td><td>A</td><td>Pts
Team_1_FC</td><td>12</td><td>10</td><td>1</td><td>1</td><td>55</td><td>12</td><td>31
Team_2_FC</td><td>10</td><td>9</td><td>1</td><td>0</td><td>43</td><td>7</td><td>28
Team_United_FC</td><td>11</td><td>7</td><td>1</td><td>3</td><td>46</td><td>12</td><td>22
Team_RANGERS_FC</td><td>14</td><td>5</td><td>5</td><td>4</td><td>33</td><td>24</td><td>20
Team_City</td><td>13</td><td>5</td><td>2</td><td>6</td><td>35</td><td>36</td><td>17
Team_TOWN_COLTS</td><td>12</td><td>4</td><td>3</td><td>5</td><td>34</td><td>20</td><td>15
Team_FC</td><td>14</td><td>4</td><td>2</td><td>8</td><td>25</td><td>48</td><td>14
Team_COLTS.</td><td>15</td><td>3</td><td>2</td><td>10</td><td>18</td><td>67</td><td>11
Team_WEL_TIGERS.</td><td>13</td><td>1</td><td>1</td><td>11</td><td>11</td><td>74</td><td>4
4. With the REPLACE TEXT function replace "^P" (line feed/end of line) with "</td></tr><tr>^P"
- Code: Select all
Team</td><td>P</td><td>W</td><td>D</td><td>L</td><td>F</td><td>A</td><td>Pts</td></tr><tr>
Team_1_FC</td><td>12</td><td>10</td><td>1</td><td>1</td><td>55</td><td>12</td><td>31</td></tr><tr>
Team_2_FC</td><td>10</td><td>9</td><td>1</td><td>0</td><td>43</td><td>7</td><td>28</td></tr><tr>
Team_United_FC</td><td>11</td><td>7</td><td>1</td><td>3</td><td>46</td><td>12</td><td>22</td></tr><tr>
Team_RANGERS_FC</td><td>14</td><td>5</td><td>5</td><td>4</td><td>33</td><td>24</td><td>20</td></tr><tr>
Team_City</td><td>13</td><td>5</td><td>2</td><td>6</td><td>35</td><td>36</td><td>17</td></tr><tr>
Team_TOWN_COLTS</td><td>12</td><td>4</td><td>3</td><td>5</td><td>34</td><td>20</td><td>15</td></tr><tr>
Team_FC</td><td>14</td><td>4</td><td>2</td><td>8</td><td>25</td><td>48</td><td>14</td></tr><tr>
Team_COLTS.</td><td>15</td><td>3</td><td>2</td><td>10</td><td>18</td><td>67</td><td>11</td></tr><tr>
Team_WEL_TIGERS.</td><td>13</td><td>1</td><td>1</td><td>11</td><td>11</td><td>74</td><td>4</td></tr><tr>
5. Now delete the last <tr>
6. Add
- Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title></title>
</head>
<body>
<table style="text-align: left; width: 75%;" border="1"
cellpadding="2" cellspacing="2">
<tbody>
<tr>
to the top
7. Add
- Code: Select all
</tbody>
</table>
<html>
to the bottom
8. Get rid if the underlines placed in Step 2. and put back the " " spaces (replace again)
- Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title></title>
</head>
<body>
<table style="text-align: left; width: 75%;" border="1"
cellpadding="2" cellspacing="2">
<tbody>
<tr>
Team</td><td>P</td><td>W</td><td>D</td><td>L</td><td>F</td><td>A</td><td>Pts</td></tr><tr>
Team 1 FC</td><td>12</td><td>10</td><td>1</td><td>1</td><td>55</td><td>12</td><td>31</td></tr><tr>
Team 2 FC</td><td>10</td><td>9</td><td>1</td><td>0</td><td>43</td><td>7</td><td>28</td></tr><tr>
Team United FC</td><td>11</td><td>7</td><td>1</td><td>3</td><td>46</td><td>12</td><td>22</td></tr><tr>
Team RANGERS FC</td><td>14</td><td>5</td><td>5</td><td>4</td><td>33</td><td>24</td><td>20</td></tr><tr>
Team City</td><td>13</td><td>5</td><td>2</td><td>6</td><td>35</td><td>36</td><td>17</td></tr><tr>
Team TOWN COLTS</td><td>12</td><td>4</td><td>3</td><td>5</td><td>34</td><td>20</td><td>15</td></tr><tr>
Team FC</td><td>14</td><td>4</td><td>2</td><td>8</td><td>25</td><td>48</td><td>14</td></tr><tr>
Team COLTS.</td><td>15</td><td>3</td><td>2</td><td>10</td><td>18</td><td>67</td><td>11</td></tr><tr>
Team WEL TIGERS.</td><td>13</td><td>1</td><td>1</td><td>11</td><td>11</td><td>74</td><td>4</td></tr>
</tbody>
</table>
<html>
Now you have perfectly valid table in HTML
9. Save as whatever.html
|
|
|
Apr 17th, 2008, 20:54
|
#8 (permalink)
|
|
New Member
Join Date: Jul 2007
Location: Sutton
Age: 47
Posts: 8
|
Re: League Table From Notepad
Thanks for the suggestion.
It looks as though there is a step missing, as everything except the 'Teams' are included in the table, the teams are listed above the table, whilst all the points etc are listed nicely in the correct Table format, but it looks promising.
|
|
|
Apr 18th, 2008, 10:37
|
#9 (permalink)
|
|
Up'n'Coming Member
Join Date: Apr 2008
Location: Or-Yehuda, Israel
Age: 60
Posts: 88
|
Re: League Table From Notepad
OK
Step 4 a
Replace "Team_" with "" (null string)
- Code: Select all
Team</td><td>P</td><td>W</td><td>D</td><td>L</td><td>F</td><td>A</td><td>Pts</td></tr><tr>
1_FC</td><td>12</td><td>10</td><td>1</td><td>1</td><td>55</td><td>12</td><td>31</td></tr><tr>
2_FC</td><td>10</td><td>9</td><td>1</td><td>0</td><td>43</td><td>7</td><td>28</td></tr><tr>
United_FC</td><td>11</td><td>7</td><td>1</td><td>3</td><td>46</td><td>12</td><td>22</td></tr><tr>
RANGERS_FC</td><td>14</td><td>5</td><td>5</td><td>4</td><td>33</td><td>24</td><td>20</td></tr><tr>
City</td><td>13</td><td>5</td><td>2</td><td>6</td><td>35</td><td>36</td><td>17</td></tr><tr>
TOWN_COLTS</td><td>12</td><td>4</td><td>3</td><td>5</td><td>34</td><td>20</td><td>15</td></tr><tr>
FC</td><td>14</td><td>4</td><td>2</td><td>8</td><td>25</td><td>48</td><td>14</td></tr><tr>
COLTS.</td><td>15</td><td>3</td><td>2</td><td>10</td><td>18</td><td>67</td><td>11</td></tr><tr>
WEL_TIGERS.</td><td>13</td><td>1</td><td>1</td><td>11</td><td>11</td><td>74</td><td>4</td></tr><tr>
Then continue with Step 5 etc...
and 4 should read: With the REPLACE TEXT function replace "^P" (line feed/end of line) with "</td></tr><tr>^P" <td>
Final result after formating:
- Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title></title>
</head>
<body>
<table style="text-align: left; width: 75%;" border="1"
cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td>Team</td>
<td>P</td>
<td>W</td>
<td>D</td>
<td>L</td>
<td>F</td>
<td>A</td>
<td>Pts</td>
</tr>
<tr>
<td> 1 FC</td>
<td>12</td>
<td>10</td>
<td>1</td>
<td>1</td>
<td>55</td>
<td>12</td>
<td>31</td>
</tr>
<tr>
<td> 2 FC</td>
<td>10</td>
<td>9</td>
<td>1</td>
<td>0</td>
<td>43</td>
<td>7</td>
<td>28</td>
</tr>
<tr>
<td> United FC</td>
<td>11</td>
<td>7</td>
<td>1</td>
<td>3</td>
<td>46</td>
<td>12</td>
<td>22</td>
</tr>
<tr>
<td> RANGERS FC</td>
<td>14</td>
<td>5</td>
<td>5</td>
<td>4</td>
<td>33</td>
<td>24</td>
<td>20</td>
</tr>
<tr>
<td> City</td>
<td>13</td>
<td>5</td>
<td>2</td>
<td>6</td>
<td>35</td>
<td>36</td>
<td>17</td>
</tr>
<tr>
<td> TOWN COLTS</td>
<td>12</td>
<td>4</td>
<td>3</td>
<td>5</td>
<td>34</td>
<td>20</td>
<td>15</td>
</tr>
<tr>
<td> FC</td>
<td>14</td>
<td>4</td>
<td>2</td>
<td>8</td>
<td>25</td>
<td>48</td>
<td>14</td>
</tr>
<tr>
<td> COLTS.</td>
<td>15</td>
<td>3</td>
<td>2</td>
<td>10</td>
<td>18</td>
<td>67</td>
<td>11</td>
</tr>
<tr>
<td> WEL TIGERS.</td>
<td>13</td>
<td>1</td>
<td>1</td>
<td>11</td>
<td>11</td>
<td>74</td>
<td>4</td>
</tr>
</tbody>
</table>
<html>
Last edited by shalom_m; Apr 18th, 2008 at 10:48.
|
|
|
Apr 18th, 2008, 18:07
|
#10 (permalink)
|
|
New Member
Join Date: Jul 2007
Location: Sutton
Age: 47
Posts: 8
|
Re: League Table From Notepad
Thanks for the amendment, which now appears to give a good formatted League Table and the programme is Free!
All now left is to find out how to use it.
Thanks for your help. 
|
|
|
Apr 18th, 2008, 19:45
|
#11 (permalink)
|
|
Up'n'Coming Member
Join Date: Apr 2008
Location: Or-Yehuda, Israel
Age: 60
Posts: 88
|
Re: League Table From Notepad
There is more than one way to skin a ........ (insert whatever is culturally, politically and morally correct for you)!
Alternatively
You could write a routine in VB or C# to do the above.
or
Use Excel to do the same.
|
|
|
| Thread Tools |
|
|
| Rate This Thread |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|