Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Reading a date from xlsx using open xml sdk

public static bool TryParseExcelDateTime(string excelDateTimeAsString, out DateTime dateTime)
{
    double oaDateAsDouble;
    if (!double.TryParse(excelDateTimeAsString, out oaDateAsDouble)) //this line is Culture dependent!
        return false;
    //[...]
    dateTime = DateTime.FromOADate(oaDateAsDouble);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Reading #date #xlsx #open #xml #sdk
ADD COMMENT
Topic
Name
9+4 =