excelR icon indicating copy to clipboard operation
excelR copied to clipboard

colnames are missing when download CSV file using "toolbar" add-in

Open zhangjunjiang opened this issue 4 years ago • 2 comments

It's quite convenient to use this tool in shiny app This is a simple bug I meet, but I think it's also very important😁😁

I have a table output like this :

excelOutput("flocu",width = "100%"))
output$flocu <- renderExcel(excelTable(data = tmp,columns=columns,showToolbar=TRUE))

When I try to download the table by click the "save" button in the toolbox, I can see the saved csv file. But this file don't have the colnames.

Expected behavior I hope colnames can be saved in the csv file. Also I think it's good to make user to set the filename, not only use the default name "jexcel"

Desktop (please complete the following information):

  • OS: windows 10
  • Browser chrome

zhangjunjiang avatar Dec 21 '21 06:12 zhangjunjiang

I got the #100 🥳🥳🥳🥳

zhangjunjiang avatar Dec 21 '21 06:12 zhangjunjiang

@zhangjunjiang you can add includeHeadersOnDownload = TRUE this to your code. This will update default setting from false and allow you to download csv with colnames. Hope this helps.😊

output$flocu <- renderExcel(excelTable(data = tmp,columns=columns,showToolbar=TRUE, includeHeadersOnDownload = TRUE))

PablaOO7 avatar Sep 16 '22 08:09 PablaOO7