Table Reformat

This script will reformat from 1 to 4 tables within an html document to have a specified number of columns (1-12). The table entries (delimited by <td> </td>) are retained in the original order of appearance. Entries specifying colspan are accomodated. If any such entry, when encountered, does not fit within the remaining columns of a row it is moved to the next row and the current row is padded with null entries. The final row of each table is also padded if necessary with null entries.

This script is also useful for inserting or deleting entries in a table. Simply place any new entry in the desired relative position or delete any entry with out regard to row length. The script will rebalance all rows to have the specified number of columns.

To use:


Number of columns: Table 1 Table 2 Table 3 Table 4