Hi,
Here is a simple example:
library(tidyxl)
library(dplyr)
library(shiny)
ui <- fluidPage(
numericInput("myInput", "Value", value = 0)
)
server <- function(input, output, session) {
shinyApp(ui, server)
#This is just needed to access the xlsx file that comes with package
testFile <- system.file("extdata/examples.xlsx", package = "tidyxl")
#Use the path to your file here instead of testFile
myXlsxFile = xlsx_cells(testFile, sheets = 1)
#Pull whatever value you need
newValue = myXlsxFile %>% filter(address == 'A5') %>% pull(numeric)
#Update the value
updateNumericInput(session, "myInput", value = newValue)
}
shinyApp(ui, server)
Hope this helps!
PJ