Hi Experts,
Currently, using this function to read the excel file and extract the specific sheet.
The sheet with 200 columns has many Date columns and is 2019-03-02 format (literally 40) and many other which are character and numeric columns.
But when we display the same sheet obtained from this code on Shiny.
Dates along with UTC 00:00:00 is displayed and it is Undesired.
Can we eliminate these unnecessary timing information from all the Dates column ? when displaying in Shiny
We could specify col_types = "text" within read_excel But even the numeric columns will be converted to text and it is undesirable.
read_excel_allsheets <- function(filename, tibble = FALSE) {
# I prefer straight data.frames
# but if you like tidyverse tibbles (the default with read_excel)
# then just pass tibble = TRUE
sheets <- readxl::excel_sheets(filename)
myFile <- lapply(sheets, function(X) readxl::read_excel(filename, sheet = X, col_names = T, skip = 5
#, col_types = "text"
))
if(!tibble) x <- lapply(x, as.data.frame)
names(myFile) <- sheets
myFile
}
mysheets <- read_excel_allsheets(inFile$datapath)
mySheet <- mysheets$Download