Here's an example of one way you could do it:
http://jsfiddle.net/asgallant/qKWZT/
In that example, I assigned class names to various cells in the table. Cells with rowspans had a class name of "rowspan_<number of rows to span>" (eg, "rowspan_2"); similarly colspan cells had a class name of "colspan_<number of rows to span>" (a cell with both rowspan and colspan would have two class names applied, eg "rowspan_3 colspan_2"). Any cells that get in the way of the row/col span cells have the class name "delete" applied. In the table's "ready" event handler, I iterate over the "delete" cells and remove them, and then iterate over the row and col span elements and set their rowSpan/colSpan properties as appropriate.