Recently I found myself converting a PDF into an EPUB. One challenge of such a task is to make the tables more compact to be able to fit in small screens. Sometimes, the best solution was to invert the rows and the columns of the table.
I looked on the web how to quickly swap rows and columns but most of the solutions involved CSS. The EPUB format does not handle CSS very well and I preferred to convert the table in pure HTML. The only solution I found was in this SO post. I added support for the TH tag, wrapped the algorithm into a nice page and published it as a ready-to-use tool.
So if you need a quick way get the transpose of an table in pure HTML, try my HTML table swapper! Note that it does not support “colspan” and “rowspan” yet.
I'm Nicolas Form, multi-skill programmer, aesthete and joyful French guy. On this blog I share my tips and tutorials about programming and IT in general. I am freelance, so you can also contact me about a website, an Android app or any other software you need. Check my portfolio and drop me a line!
I'm Nicolas Form, entrepreneur, full-stack programmer and joyful French guy. On this blog I share my tips and tutorials about programming and IT in general.