Table of Contents

ExcelDateSystem Enum

Definition

Namespace
Bodu.Formats.Excel
Assembly
Bodu.Formats.Excel.Binary.dll
Package
Bodu.Formats.Excel.Binary 1.0.0
Source
ExcelDateSystem.cs

Identifies the date base (epoch) a workbook uses to interpret serial date numbers.

public enum ExcelDateSystem
Extension Methods

Fields

Excel1900 = 0

The 1900 date system, whose epoch is 1899-12-30 (the default for workbooks authored on Windows).

Excel1904 = 1

The 1904 date system, whose epoch is 1904-01-01 (historically the default for workbooks authored on the Macintosh).

Remarks

A workbook declares its date system through the date-mode record. The two systems differ by 1,462 days, so a serial number must be paired with the correct system to recover the intended calendar date.

// The same serial number names two different days depending on the workbook's system.
DateOnly windows = ExcelSerialDate.FromSerialDate(45000.0, ExcelDateSystem.Excel1900); // 2023-03-15
DateOnly mac     = ExcelSerialDate.FromSerialDate(45000.0, ExcelDateSystem.Excel1904); // 2027-03-16

Applies to

ProductVersions
.NET8, 10