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:
- Paste the content of a document into the text area, after copying it from any text editor, for example.
- Select the number of columns for each of upto four tables in the document (in the order of appearance).
- Push the Reformat button.
- After a short time the text area will contain the document with reformatted tables.
- Select all of the text (cntr-a), copy it (Cntr-c) and then paste it into a document in any editor, which can then save it to a file.