-
Notifications
You must be signed in to change notification settings - Fork 179
Open
Description
When Custom Table Container is there, it does not export in excel the way it is showing in actual DT table. For example : Sepal and Petal columns are not showing in exported file.
sketch = htmltools::withTags(table(
class = 'display',
thead(
tr(
th(class = 'dt-center', rowspan = 2, style = "border-right: solid 1px #aaaaaa;", 'Species'),
th(class = 'dt-center', colspan = 2, style = "border-right: solid 1px #aaaaaa;", 'Sepal'),
th(class = 'dt-center', colspan = 2, 'Petal'),
),
tr(
th("Length"),
th(style = "border-right: solid 1px #aaaaaa;", "Width"),
th("Length"),
th("Width")
)
)
))
datatable(iris[1:20, c(5, 1:4)], container = sketch, extensions = 'Buttons', rownames = FALSE,
options = list(paging = FALSE, searching = FALSE, ordering=F, info = FALSE,
columnDefs = list(list(className = 'dt-center', targets = 0:4)),
dom = 'Bfrtip',
buttons =
list(list(
extend = 'collection',
text = '<i class="fa fa-bars"></i>',
autoClose = TRUE,
buttons = list('csv', 'excel')))))
Metadata
Metadata
Assignees
Labels
No labels