none
EPPlus Changes date 01-01-1900 to 12-31-1899 RRS feed

  • Question

  • Hi,

    I have a WPF applicationwhere I use EPPlus to read in Excel worksheets.  I have the following code:

    ExcelRange range;
    ExcelPackage xlPackage;
    ExcelWorksheet xlWorkSheet;

    FileStream fsFileStream = new FileStream(strFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
    xlPackage = new ExcelPackage(fsFileStream);
    ExcelWorksheets excelSheets = xlPackage.Workbook.Worksheets;
    xlWorkSheet = xlPackage.Workbook.Worksheets.First();

    In my data one of the cells has the date value 01-01-1900.  When I step through my code  and look at xlWorkSheet, Cells, Result View this date is now 12-31-1899.

    Does anyone know why this happens?  Is there a parameter or something I can set to override this behavior?

    Thanks, Kent

    • Moved by Bob Ding Thursday, November 2, 2017 7:52 AM
    Wednesday, November 1, 2017 5:25 PM

Answers