I have a gt table that includes sparklines and plots inline. The code broadly follows this excellent post by Albert Rapp.
I'm looking to render the table to a docx document, with the format and charts as it appears in the R Studio Viewer. However, I get unformatted tables with html code.
Rendering a gt table with sparklines and plots into a Word (DOCX) document is tricky because gt primarily exports as HTML, which Word doesn’t fully support.
Possible Solutions:
Use officer + flextable: Convert gt to flextable for better Word compatibility.
This is very helpful, thank you very much. I’ll give these a try and see where I land.
Related, is it easier to get from html to pdf (if not word)? I’d be happy to write most of my content in Quarto, render to html and save to pdf, if that was possible.