Not a Legal OleAut Date whne using EPPLUS dll AutoFitColumns()

Apoorv 1 Reputation point
2021-11-19T12:32:28.267+00:00

An EPPLUS function worksheet5.Cells.AutoFitColumns() is giving an error after data in already loaded in Workshet Object. Also cannot debug into the DLL operation to find out which Column\Cell is causng the error. Can anyone help?

{"Not a legal OleAut date."}
Data: {System.Collections.ListDictionaryInternal}
HResult: -2146233066
HelpLink: null
IPForWatsonBuckets: 0x00007ffb811fccc7
InnerException: null
IsTransient: false
Message: "Not a legal OleAut date."
RemoteStackTrace: null
Source: Evaluation timed out
StackTrace: "   at System.DateTime.TicksToOADate(Int64 value)\r\n   at OfficeOpenXml.ExcelRangeBase.FormatValue(Object v, ExcelFormatTranslator nf, String format, String textFormat)\r\n   at OfficeOpenXml.ExcelRangeBase.AutoFitColumns(Double MinimumWidth, Double MaximumWidth)\r\n   at OfficeOpenXml.ExcelRangeBase.AutoFitColumns()\r\n   at RiskReport.RiskReportForm.generateRiskReportExcel(Int32 runLogID) in C:\\Users\\<>\\<>\\Work Folder\\<>\\AWS Versions\\<>\\<>\\RiskReport\\Form1.cs:line 1004"
TargetSite: {Double TicksToOADate(Int64)}
WatsonBuckets: null
_HResult: -2146233066
_className: null
_data: {System.Collections.ListDictionaryInternal}
_dynamicMethods: null
_exceptionMethod: null
_exceptionMethodString: null
_helpURL: null
_innerException: null
_ipForWatsonBuckets: 0x00007ffb811fccc7
_message: "Not a legal OleAut date."
_remoteStackIndex: 0
_remoteStackTraceString: null
_safeSerializationManager: {System.Runtime.Serialization.SafeSerializationManager}
_source: "mscorlib"
_stackTrace: {sbyte[192]}
_stackTraceString: null
_watsonBuckets: null
_xcode: -532462766
_xptrs: 0x0000000000000000
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,922 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.