Skip to contents

Excel stores dates as a day count, but from one of two origins. Which one is recorded in the workbook itself, in the date1904 attribute of xl/workbook.xml – so it can be read rather than inferred. Passing the result to serial_to_day_month() or restore_day_month() removes the only assumption that can silently shift every restored value by four years and one day.

Usage

excel_date_system(path)

Arguments

path

Path to an .xlsx file.

Value

"1900" or "1904".

Examples

path <- system.file("extdata", "typed-numbers.xlsx", package = "unexcel")
excel_date_system(path)
#> [1] "1900"