Error: Valid values are between 0 and 999, inclusive. Parameter name: millisecond

When loading a CSV file into an Aspose.Cells Excel workbook, I get the following error:

Valid values are between 0 and 999, inclusive. Parameter name: millisecond

The cause is that Aspose is not handling microseconds in excess of 999499. For example, a DateTime value in the CSV like this will result in the error:

2021-12-14 16:33:59.999794

Here is my code to load the CSV file:

var loadOptions = new LoadOptions(LoadFormat.CSV);
var wb = new Workbook(fullPathToCsvFile, loadOptions);

@jcapsonbr,

Please try the latest fix/version: Aspose.Cells for .NET v21.12.3(attached)
Aspose.Cells21.12.3 For .Net2_AuthenticodeSigned.Zip (5.6 MB)
Aspose.Cells21.12.3 For .Net4.0.Zip (5.6 MB)
Aspose.Cells21.12.3 For .NetStandard20.Zip (5.6 MB)

I tested your scenario/case using latest version a bit. I pasted the value “2021-12-14 16:33:59.999794” into a text file and save it as “.csv”. Now I used the following sample code and it works fine and I do not find any exception:
e.g.
Sample code:

var loadOptions = new LoadOptions(LoadFormat.Csv);
var wb = new Workbook("e:\\test2\\test1.csv", loadOptions); 

If you still find the issue using latest version/fix, kindly do share your sample CSV file, we will check it soon.