Not a Legal Oleaut Date in C#
Nov 24 2022
Uncategorized

This data comes directly from the ERP database and most of it cannot be modified in the ERP GUI (without manipulating the database). An OADate is represented by a double value whose value is the number of days from midnight on December 30, 1899 (negative values representing earlier dates). Thank you, it was a date before 1900 but really well hidden. 🙂 As the display format in the database was dd/mm/yy (01/01/0022 displayed as 01/01/22), this deceived me for 01/01/2022. I agree, the error reported by the report server (this is our case) is insufficient. There is nothing but a basic error message, so it is necessary to search for all tables with date columns! This exception is thrown when an attempt is made to convert a value outside the valid Ole Automation date range to/from a .NET DateTime value (DateTime.FromOADate and DateTime.ToOADate methods – which are also implicitly used for COM Interop). In this scenario, you can simply replace any value before or on that date, and then specify what you want as output I`m trying to read the Excel worksheet, which basically reads the date column and compares whether it`s a future date. But I get errors like “Reading pane: no legal OleAut date”. The text was updated successfully, but the following errors occurred: Remove special characters from date field values Do you check the actual date values in your table? You probably have a date earlier than 1/1/1900 in one of the date fields in the table you want to load. Is there a way to disable this check? Technically, this is valid data.

What if a museum wanted to categorize its artifacts by date? Not? I completely agree with @Zunair. If the service data is not acceptable, the desktop application must report/warn/disallow. At the same time, it would be better if it simply accepted valid data. This will be a problem in your data. Look for a date earlier than 1/1/1900. I`m lost about that. Any advice or help is appreciated. FilgraphManagerClass Freeze in Windows Form application I had the same problem and it was for some strange reason that the “Reading Pane” activity couldn`t really retrieve the cell or it would get it in the wrong format instead of just the cell value.

Unfortunately, I can`t send an Excel example because it 🙁 Sensitive financial data contain. The problem is also that there are a lot of sheets in each Excel and hundreds of cells in each sheet, and I found a way to determine which cell(s) is causing the error. Thank you for your answer, I found a solution from someone. The problem was with the Excel spreadsheet. One row was Custom and the column type was General, so they conflicted. Does anyone know what that means? Retrieving in C# Winforms applications: By clicking “Post Reply”, you agree to our Terms of Use, Privacy Policy and Cookie Policy, which I believe are valid for conversion to OADate, the .NET DateTime value must be strictly greater than 01/01/0100. Could you guide me in the easiest and fastest way to read whole sheets of paper with names? To remove special characters from the field value, double-click the cell, select them, and then press the Delete key on your keyboard. You can also set empty field values to null. See FAQ: Is it possible to assign null values to a field using the field calculator? to know the steps to follow. The fact is that in workboks, there is one sheet that I have to read and another sheet that is garbage. It`s probably 99% that the problem is with one of these trash sheets, but I couldn`t find a way to skip these sheets in the asDataSet method, which could probably fix the problem too.