getDateOrigin | R Documentation |
Return the date origin used internally by an xlsx or xlsm file
getDateOrigin(xlsxFile)
xlsxFile |
An xlsx or xlsm file. |
Excel stores dates as the number of days from either 1904-01-01 or 1900-01-01. This function
checks the date origin being used in an Excel file and returns is so it can be used in convertToDate()
One of "1900-01-01" or "1904-01-01".
Alexander Walker
convertToDate()
## create a file with some dates
## Not run:
write.xlsx(as.Date("2015-01-10") - (0:4), file = "getDateOriginExample.xlsx")
m <- read.xlsx("getDateOriginExample.xlsx")
## convert to dates
do <- getDateOrigin(system.file("extdata", "readTest.xlsx", package = "openxlsx"))
convertToDate(m[[1]], do)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.