This is great, but I did notice that Lyx would not compile when I had a % in either the row or column names. Also, I believe a simple adjustment can be made to lines 103-111 so that you can index the format variable so that it need not be the same for every part of the table.