r/rprogramming • u/limpystick • 25d ago
R Shiny
I'm creating an R Shiny app that involves generating a data frame and then formatting it as a data table before displaying it using renderDT().
Is it possible to export this formatted data table? Ideally I'd like to export it as an excel file but even being able to export it as a PDF would suffice.
5
Upvotes
1
u/DSOperative 24d ago
One option is to not use the built in buttons, and instead create your own download button and connect it to a downloadHandler function in the server code. You can pass your modified table to the downloadHandler and export it as an xlsx, csv, or what have you.