I am having trouble with the download/copy/print etc buttons in Shiny and can't get any of the suggested fixes to work. I have a DT table in Shiny with buttons to download as CSV etc. It is a two-column table.
There is also a third column with a 'clipboard' button that allows the user to copy the selected row. I am trying to exclude this third column when downloading/printing etc. Please see below the DT:
The code I have to exclude specific columns from export works in general, but doesn't exclude the third column with the action button. The code to only include columns 1 & 2 in the export is in Section 3 & Highlighted below:
Sections 1,2 & 4 have codes pertaining to the "clipboard action button".
I've searched a ton online and looked through the different reference docs but can't seem to find a way to exclude column 3 when exporting.
Has anyone come across this before?
Try this:
buttons = list(
list(extend = "copy", exportOptions = list(columns = c(0,1)),
list(extend = "excel", exportOptions = list(columns = c(0,1)),
......
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.