I have an R code, which process the dataframe and get result in excel. But some have I could see Download function is not working properly.
Intially I selected data which does not have "DATE" column ,palced in the dataframe and downloaded it.
After that I'll add a column name "DATE" and will download it again.
But the problem lies here, somehow I'm getting "DATE" column in the 'dfOutput'. How can I resolve this?
and my second question is, how can I add sheet to the write_xlsx file?
dfOutput <- sqldf("select dfOutput.* from dfOutput")
output$loadOutput <- downloadHandler(
filename = function(){ ("dfOutput.xlsx")},
content = function(file){ write_xlsx(dfOutput, path = file)}
)
dfOutput$Date <- dtDate
dfOutputDate <- sqldf("select dfOutput.* from dfOutputDate")
output$loadOutputDate <- downloadHandler(
filename = function(){ ("dfOutputDate.xlsx")},
content = function(file){ write_xlsx(dfOutputDate, path = file)}
)