xlex: getxl Examples

Description Examples

Description

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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)

modgetxl documentation built on July 9, 2020, 9:06 a.m.

Related to xlex in modgetxl...