We want to upload the file in shiny
But read only values based on cell color properties
(Cell background = white -> read value
else ignore)
How can we do it ?
Please find the template to read excel below
and screenshot of an excel :
#install.packages("readxl")
library(shiny)
library(readxl)
runApp(
list(
ui = fluidPage(
titlePanel("Use readxl"),
sidebarLayout(
sidebarPanel(
fileInput('file1', 'Choose xlsx file',
accept = c(".xlsx")
)
),
mainPanel(
tableOutput('contents'))
)
),
server = function(input, output){
output$contents <- renderTable({
req(input$file1)
inFile <- input$file1
read_excel(inFile$datapath, 1)
})
}
)
)