I have an excel macro that generates basic HTML code for me and I paste it
into the web page.

Last years worked fine.

This year it's not happy.

The code at the end of one table and start of the next looks like this:

<td>The Felbridge Bowl (+ Medal)</td>
              <td>Winner Class A</td>
              <td>109</td>
              <td>Rob</td>
              <td>Dowling</td>
              <td>Chichester</td>
              <td>790</td>
              <td>-</td>
          </tr>
      </tbody>
</table>

<TABLE>
<TR>
<TD COLSPAN="3">
Class A</TD>
<TD COLSPAN="5">
1</TD>
<TD COLSPAN="5">
2</TD>
<TD COLSPAN="1">
3</TD>
</TR>
<TR>
<TD COLSPAN="1">
No</TD>
<TD COLSPAN="2">
Name</TD>
<TD COLSPAN="4">
4 x 50m</TD>
<TD COLSPAN="1">
Tot</TD>
<TD COLSPAN="4">
4 x 100yd</TD>
<TD COLSPAN="1">
Tot</TD>
<TD COLSPAN="1">
Agg</TD>
</TR>
<TR>
<TD> 101</TD>
<TD>Linda</TD>
<TD>Smallbone</TD>
<TD>98</TD>
<TD>96</TD>
<TD>94</TD>
<TD>96</TD>
<TD>384</TD>
<TD>98</TD>
<TD>95</TD>
<TD>96</TD>
<TD>96</TD>
<TD>385</TD>
<TD>769</TD>
</TR>
When I paste it into a "results" page The first table is fine and the second
one is miles below it after acres of white space.

When I look at the page source it is different to what I see in the editor
with a <br /> code added to the end of each line of the second table like
this:

<td>The Felbridge Bowl (+ Medal)</td>
<td>Winner Class A</td>
<td>109</td>
<td>Rob</td>
<td>Dowling</td>
<td>Chichester</td>
<td>790</td>
<td>-</td>
</tr>
</tbody>
</table>
<p></p><table><br />
<tr><br />
<td colspan="
3
"><br />
Class A</td><br />
<td colspan="
5
"><br />
1</td><br />
<td colspan="
5
"><br />
2</td><br />
<td colspan="
1
"><br />
3</td><br />
</tr><br />
<tr><br />
<td colspan="
1
"><br />
No</td><br />
<td colspan="
2
"><br />
Name</td><br />
<td colspan="
4
"><br />
4 x 50m</td><br />
<td colspan="
1
"><br />
Tot</td><br />
<td colspan="
4
"><br />
4 x 100yd</td><br />
<td colspan="
1
"><br />
Tot</td><br />
<td colspan="
1
"><br />
Agg</td><br />
</tr><br />
<tr><br />
<td> 101</td><br />
<td>Linda</td><br />
<td>Smallbone</td><br />
<td>98</td><br />
<td>96</td><br />
<td>94</td><br />
<td>96</td><br />
<td>384</td><br />
<td>98</td><br />
<td>95</td><br />
<td>96</td><br />
<td>96</td><br />
<td>385</td><br />
<td>769</td><br />
</tr><br />
I assume I'm doing something simply wrong but not spotting it.

The new page is here if you want to look at it:

https://www.egtsc.co.uk/results/dewar-open-shoot-april-2023 [1]

Accepted answer

Found it in the "Raw HTML" as above.

Untick this and all is back to normal !

Thanks for pointing me in the right direction.

Comments

Looks like there's some html filtering going on. Have you tried pasting into various "Formatting Options" environments?

When I do this kind of stuff I usually set up a "Raw html" filter which basically does no filtering. 

Hi

I found that problem out before. If I use "filtered HTML" when I paste the tables into the page, all the table code is stripped out. So these pages are using "Raw HTML".

Which, I guess, is why I've raised the question. It looks like RAW is doing something it shouldn't. However, last year's page still works OK even if I go in and look at the HTML code. Although I haven't tried saving it to see if the same happens as it's working and I don't want to break it.

BTW. I also tried using ASPOSE.APP excel converter which worked well for another multi-sheet excel workbook. When I use it here something even stranger happens. I get the right info in an identically formatted table but if I then scan down the page past a lot of white space There is another set of data from the same table from some years ago! Further down there is more data from even earlier. Like 20 years ago! So much for MS recovery algorithms and data privacy rules!

Sounds very odd.

I suggest copy the tables to a new workbook using paste values. Then try copy them in how you previously did it.

HTML code is written to a text file by Excel so all I do is paste it into the page.

Did you copy the full code and paste it here... if so, the <table>,  <tbody> and <tr> are missing from the code...

<td>The Felbridge Bowl (+ Medal)</td>
              <td>Winner Class A</td>
              <td>109</td>
              <td>Rob</td>
              <td>Dowling</td>
              <td>Chichester</td>
              <td>790</td>
              <td>-</td>
          </tr>
      </tbody>
</table>

No. It's just a section of the code at the end of the first (Prize List) table and start of the second (Class A Results) table. Full code runs to 7,000+ lines !

The issue is that the first table is OK when I look at web page source but the second table has a < /b> tag at the end of every line which isn't in the code I see in the editor. So where does it come from? ... and is that the reason the page has gone quirky on me?

You can also add the <table> <tbody> etc.. to the tags in the  "filtered HTML" text filter.

 

In the "Limit allowed HTML tags"

Found it in the "Raw HTML" as above.

Untick this and all is back to normal !

Thanks for pointing me in the right direction.