inst/shiny-examples/02_user-picks-worksheet/server.R

library(shiny)
library(googlesheets)
library(DT)

gap_ss <- gs_gap()

shinyServer(function(input, output, session) {

  output$gap_ss_info <- renderPrint(print(gap_ss))

  worksheet <- reactive({
    input$ws
  })

  output$the_data <- renderDataTable({

    gap_data <- gs_read(gap_ss, ws = worksheet())

    datatable(gap_data)

  })

})
jennybc/googlesheets documentation built on Feb. 8, 2022, 11:48 p.m.