I gave up on that approach and now use jquery Data Tables almost exclusively.
Now my users are not limited as to the format they want to see the data in, and can sort and filter however they want.
I include references to the jquery code, surround the table in the appropriate tags, and the rest takes care of itself.