Single table package to render 'well' in Word, HTML and PDF

Hi,
I am responsible for creating and submitting reports, some of our cooperators require Word, some PDF and others HTML. I am looking for a package I can use to build tables in Rmarkdown that pandoc will render to all 3 formats reasonably well. I have tried gt which is a great html table, flex table works with Word and html and knitr::kable() builds great html and pdf tables. I have yet to find something that works on all three. The tables are pretty simple, no advanced formatting. I could use some direction, at this point I am stuck building my tables twice (which is still better than building them once in MS Word, probably ought not complain) :neutral_face:.

Thanks

Maybe you could build parameterized reports with RMarkdown. You will still make your tables twice; however, all three reports could be done automatically each using your preferred package depending on the rendering format. If you need a quick overview, this 3-min video will help: https://www.youtube.com/watch?v=av76su2bBTE. If you want to dive deeper, there are many tutorials out there. Yihui's book will help too: https://bookdown.org/yihui/rmarkdown/parameterized-reports.html

Depending on what you want as PDF output, you may also considered printing your HTML document to PDF. This way you'll have your HTML tables in your PDF.

This is different than passing by Latex to create the PDF but if you look for the same output, it would work.

Obviously, you can also print word to PDF :sweat_smile:

Do you look for something that render nicely latex tables ?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.