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)

  })

})

Try the googlesheets package in your browser

Any scripts or data that you put into this service are public.

googlesheets documentation built on May 2, 2019, 1:57 p.m.