Read all values from complex html table

nathan1324

New Member
Hi,

I have an HTML data table that has a complex structure where some rows span multiple columns and other rows contain multiple column values. Here is the code of a similar table:
<table> <caption>A complex table</caption> <thead> <tr> <th colspan="3">Invoice #123456789</th> <th>14 January 2025 </tr> <tr> <td colspan="2"> <strong>Pay to:</strong><br> Acme Billing Co.<br> 123 Main St.<br> Cityville, NA 12345 </td> <td colspan="2"> <strong>Customer:</strong><br> John Smith<br> 321 Willow Way<br> Southeast Northwestershire, MA 54321 </td> </tr> </thead> <tbody> <tr> <th>Name / Description</th> <th>Qty.</th> <th>@</th> <th>Cost</th> </tr> <tr> <td>Paperclips</td> <td>1000</td> <td>0.01</td> <td>10.00</td> </tr> <tr> <td>Staples (box)</td> <td>100</td> <td>1.00</td> <td>100.00</td> </tr> </tbody> <tfoot> <tr> <th colspan="3">Subtotal</th> <td> 110.00</td> </tr> <tr> <th colspan="2">Tax</th> <td> 8% </td> <td>8.80</td> </tr> <tr> <th colspan="3">Grand Total</th> <td>$ 118.80</td> </tr> </tfoot> </table>

Read more: https://html.com/tables/#ixzz5xvY9UPDS

When I spy a cell of the table and do a GetTable I am only returning two rows that are in the middle of the data table. If I can get the values of the entire table, then I can do a get HTML attribute: value on the certain rows I want to return. Any suggestions on how I can return the entire table?
 
Top