Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using columns and getSelectedData options in excelTable give unexpecte behaviour with column rename #81

Closed
mmoisse opened this issue Oct 2, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@mmoisse
Copy link

mmoisse commented Oct 2, 2020

Describe the bug
Defining columns and setting getSelectedData to TRUE in excelTable give unexpected behaviour with column rename. Only the last column name change is remembered.

To Reproduce
Steps to reproduce the behavior:

library(shiny)
library(excelR)

shinyApp(
  ui = fluidPage(excelOutput("table"), verbatimTextOutput("out")),
  server = function(input, output, session) {

    data = reactive({
      iris[1:10,]
    })
        
    output$table <- renderExcel({
      DF = data()
      if (!is.null(DF)) {
        excelTable(DF, columns=data.frame(title=colnames(DF)), getSelectedData=T)
      }
    })
    
    output$out <- renderPrint({
      if(!is.null(input$table)) {
         excel_to_R(input$table)
      } else {
         data()
      }
    })
  }
)

Expected behavior
Persistent column name change

Desktop (please complete the following information):

  • OS: Linux
  • Version excelR_0.4.0 shiny_1.5.0
@mmoisse mmoisse changed the title Usinge columns=data.frame(title=colnames(DF)), getSelectedData Usinge columns and getSelectedData options in excelTable give unexpecte behaviour with column rename Oct 2, 2020
@mmoisse mmoisse changed the title Usinge columns and getSelectedData options in excelTable give unexpecte behaviour with column rename Using columns and getSelectedData options in excelTable give unexpecte behaviour with column rename Oct 2, 2020
@Swechhya Swechhya added the bug Something isn't working label Oct 2, 2020
@Swechhya
Copy link
Owner

Swechhya commented Oct 3, 2020

@mmoisse Thank you for reporting this issue. This has now been fixed in the latest development version. Feel free to reopen this issue if it persists.

@Swechhya Swechhya closed this as completed Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants