Taking very long time to find CurrentRegion for big tables in workbook

aspose_end_table.PNG (22.6 KB)
aspose_start_table.PNG (33.1 KB)

Hi,
I am using Aspose.Cells for .NET to read tables from a workbook which can have multiple tables within a sheet (each table with different number of rows and columns). I do not know the bounds for these tables beforehand, therefore I want to find them using the CurrentRegion property. For this I am using below code:

        var range = worksheet.Cells.CreateRange("A1");
        var currentRegion = range.CurrentRegion;

This current region property helps me reading these tables. It usually works fine, it even worked well (reasonable time) with a table of 40,000 records. But now that I am trying to read a table with 116,000 records it is taking a very long time to get the CurrentRegion (10 minutes). The same was accomplished using excel interop library in less than a minute.

I was thinking of replacing excel interop library with Aspose.Cells in my application. The feature of computing bounds of any table using CurrentRegion property is very important for my application and cannot work without it. But this performance difference is not acceptable as my users usually have big excel workbooks.

I have attached table starting and ending images to give you an idea. Please suggest me something to reduce the time taken to find the CurrentRegion.

@kanbee,

Thanks for the screenshots.

Could you please zip and attach your template Excel file to reproduce the issue. We will check your issue soon.

asposeTest.7z (4.6 MB)

Please find the attached template file.

@kanbee,

Thanks for the template XLSX file.

I am able to reproduce the issue as you mentioned by using your template file. I found Range.CurrentRegion is taking very long time for big tables in the workbook.
e.g.
Sample code:

Workbook workbook = new Workbook("g:\\test2\\asposeTest.xlsx");
Aspose.Cells.Worksheet worksheet = workbook.Worksheets[0];
var range = worksheet.Cells.CreateRange("A1");
var currentRegion = range.CurrentRegion;

We need to evaluate your issue in detail. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-53855

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@kanbee,

This is to inform you that your issue (logged as “CELLSNET-53855”) has been resolved. The fix will be included in an upcoming release ( Aspose.Cells v23.8) that we plan to release in the second week of August 2023. You will be notified when the next version is released.

Thank you for taking immediate action. This is really exciting news for us.

@kanbee,

You are welcome.

Stay tuned!

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