xlex {modgetxl}R Documentation

getxl Examples

Description

use shiny module getxl/UI for interactive input of Excel files

Examples

library(shiny)
library(modgetxl)
app<- shinyApp(  
 ui= uiOutput('xltest'),
 
 server= function(input, output) {
 	sink(file=stderr())
 	options(shiny.maxRequestSize=1*1024^2) # 1MB
 
 	output$xltest<- renderUI({
 		getxlUI('server')
 		})
 
 	xl<- callModule(getxl, 'server')
 	# excel sheets info and data are available once user uploads excel file in UI
 	# returned xl has reactiveValues of two variables as below
 	observeEvent(xl$sheets,{
 		print(xl$sheets)
 		print(head(xl$sheetdata[[1]]))
 		})
 	}
 
)
## Not run: 
runApp(app)

## End(Not run)


[Package modgetxl version 0.4 Index]