We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

[Regression] Cells.ImportTwoDimensionArray stopped working properly with Aspose.Cells 21.6.0


After upgrading Aspose.Cells to its latest version 21.6.0, I noticed Cells.ImportTwoDimensionArray no longer works properly and produces incorrect data on random cells.


        var arrayOutCopy = new object[210, 15];
        var lines = System.IO.File.ReadAllLines(@".\data.out");
        for (int row = 0; row < lines.Length; ++row)
            var fields = lines[row].Split(';');
            for (int col = 0; col < 15; col++)
                arrayOutCopy[row, col] = fields.Length > col && !string.IsNullOrEmpty(fields[col]) ? fields[col] : null;

        var workbook = new Workbook(@".\model.xlsx");
        var outputWorkbook = new Workbook();
        Cells cellsToAddTo = outputWorkbook.Worksheets[0].Cells;
        var txtLoadOptions = new TxtLoadOptions { ConvertDateTimeData = true, ConvertNumericData = true, LoadStyleStrategy = TxtLoadStyleStrategy.BuiltIn };

        cellsToAddTo.ImportTwoDimensionArray(arrayOutCopy, null, 0, 0, txtLoadOptions);

The code above reads data from file ‘test.out’ into a 2D Array, then import it to a model file.

With previous Aspose versions (e.g. 21.2.0), all data was imported correctly, but with 21.6.0, wrong data appeared on some cells.

I’ve attached the test files and screenshots before/after upgrade here for your reference:

data.zip (104.5 KB)
21.2.0 (working): image.png (70.0 KB)
21.6.0 (not working): image.png (92.6 KB)

As we are heavily relying on Aspose’s functionality to import data, this prevents us from using the latest version. Could you help me check this regression?


We have observed this issue and logged it in our database for further investigation. We will notify you here once any update is ready for sharing.

This issue is logged as:
CELLSNET-48149 - Cells.ImportTwoDimensionArray stopped working properly with Aspose.Cells 21.6.0

Please try the latest fix:
Aspose.Cells21.6.1 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells21.6.1 For .Net4.0.Zip (5.5 MB)
Aspose.Cells21.6.1 For .NetStandard20.Zip (5.5 MB)

The issues you have found earlier (filed as CELLSNET-48149) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao