A1A2A3A4A5A6A7A8A9A10
B1B2B3B4B5B6B7B8B9B10
C1C2C3C4C5C6C7C8C9C10
D1D2D3D4D5D6D7D8D9D10
E1E2E3E4E5E6E7E8E9E10
F1F2F3F4F5F6F7F8F9F10
G1G2G3G4G5G6G7G8G9G10
H1H2H3H4H5H6H7H8H9H10
I1I2I3I4I5I6I7I8I9I10
J1J2J3J4J5J6J7J8J9J10

Trying some cell merges.

Right-click on a cell and choose a merge direction.

Choose "Show area" to see where my script thinks the neighbors are.

Issue: works fine at first, but things go badly wrong when a merge happens near another merged area, since rowspan or colspan has been altered and the indexes are different.

Rather than use hard-coded ids, I am using the <td>'s location in the row... but rowspans and colspans throw off the index... gotta think about how to resolve that.