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

Free Support Forum - aspose.com

Searching Cells from xlxs file take too much time

I have a time table in xlsx formate which includes about 200 cell and 20 colums, i m finding some merged cells with given conetent and it take about 20-30 sec and LogCat also show a message of Heap grew and heap memory usage approaches to 25 mb.


Could you paste here complete sample code (runnable) here, so we could test your issue on our end with latest version v8.3.1. If we find the issue (searching cells in the sheet takes 20-30 seconds), we will log a ticket for it. Also, you may simply place starting and ending points to get the exact time intervals when it searches the cells to evaluate if it is actually taking more time or the delay is due to some other factor.

Thank you.

Here is my complete project. Please import the aspose libraries in it and put the attached xlsx file in a new folder named “Student Manager” folder. Open it, select Time Table, section any day, select Batch 12 and Section B and then check it, how much time it takes at your side. It takes 5-8 seconds on my Galaxy Star duos. What if I want to compute the time table for all days, It may take 5*5 seconds. My Logical class is Time Table in second package.


Thanks for the sample project.

Well, Aspose.Cells for Android component belongs to data process regarding different features and tasks it supports for spreadsheet management. Generally, we think the code segments regarding Aspose.Cells APIs should not be placed in an UI thread in Android, it would surely take a bit more time to process it. We are evaluating your code segments in the project and we also found a few issues/ problems in the code while using Aspose.Cells APIs… We will try to do the optimization in the code segment, we will get back to you soon.

Thank you.


We have analyzed your code segments in the project. The major problem in your code is initiating the same workbook over and over/ again in (TimeTableActivity and OneDayTimeTableActivity source files). Now it only opens once in the TimeTableActivity. So the first time you click “View Time Table” button, it needs more time to init workbook comparing to the following clicks.
We have some tips for your that you may follow to enhance the performance and efficiency:

1) Try to use RowCollection.Iterator() and Row.Iterator() first while looping through cells using Aspose.Cells APIs.

2) Try to avoid looping through column cells.

3) Try to avoid putting the data processing in the UI thread. This may cause FC in Android if there is no response in 5 seconds.

4) Try to cache some data, e.g., cache the return row index in Timetable.IsAnyLecture(String, String, String) method for the selected Day, Batch, Section, etc.

5) Try to use the functions of android class “Intent” to transport parameters between Activities.

We have attached the updated project (in which we have updated your code segment a bit) for your reference here.

Hope, this helps a bit.

Thank you.

Thanks dear Sir, it gone amazing now. You are amazing. God bless you.

I hope i ll be exploring you more APIs and become you ambassador at my University.

In the updated project, you asked to cache selected batch and etc. I think i should cache firstThreeColumn String array so whenever app loads, this array will already be calculated. Am i right? Should I use cache or shared preferences?


Good to know that it helps a bit for your scenario, hopefully your issue (regarding performance) is sorted out now.
Well, we actually suggested you to try to cache the return row index in Timetable.IsAnyLecture(String, String, String) method for the selected Day, Batch, Section etc. and not cache the batch. We recommend you should refer to Android Developer Documentation to know more about the android development.

Thank you.