Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed Apr 01, 2015 9:38 am

Hi E-ICEBLUE Team,

I'm French and i'm pretty bad in english but i will try ! Excuse for my bad english.

I try for two weeks to optimize the processing time of the method DataSorter.Sort() with no result. I'm sorting a Excel file with +/- 300 000 rows and 14 columns. At this time, the processing time is more than one hour (i don't know exactly the time, i always stopped after one hour). My file is in .xlsx if this can help you.


My part of code is like this :

Code: Select all
workbook.DataSorter.SortColumns.Add(7, OderBy.Ascending);
workbook.DataSorter.Sort(worksheet[A1:Q300000]);


Do you have a idea where i can gain time ? Or it's normal the processing time is more than one hour for a sorter on 300 000 rows ?

Best regards,

Gautier.

Edit : I finally decided to let end the processing time, it took like +/- 1H30 - 2H. It's normal when we do it directly on Excel (on 300 000 rows), is like instant ? I remenber it's was just a question, not a reproach ! :P

GAUTIER31170
 
Posts: 4
Joined: Fri Jun 06, 2014 9:29 am

Thu Apr 02, 2015 8:51 am

Hello,

Thanks for your inquiry.
Please package your xlsx document into ZIP file format. Then, upload your zip file . It will help us reproduce your issue quickly and resolve it.
Please feel free to contact us for any problems.

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Thu Apr 02, 2015 2:45 pm

Hi!,

I can't upload my .xlsx document here cause he's too big ( ~ 5Mo ) and max is 2Mo on the forum.

You can download my .xlsx file here :
[www petit-fichier fr/2015/04/02/exemple/] <= (3 columns / ~ 300 000 rows)
Replace " " by "." and just enter the CAPTCHA code.


This morning i just tried this on this file :
Code: Select all
workbook.DataSorter.SortColumns.Add(3, OderBy.Ascending);
workbook.DataSorter.Sort(worksheet["A1:C310146"]);

but this still too long :| (very very very long)


Do you have a idea to reduce the processing time ? (if it's possible) :mrgreen:

Best Regards

Gautier.

Edit : You have tooooooo many security on this forum, can't upload more than 2 Mo, can't put Urls in posts ... how can you help me if i can't send you the document :|
Last edited by GAUTIER31170 on Fri Apr 03, 2015 11:51 am, edited 1 time in total.

GAUTIER31170
 
Posts: 4
Joined: Fri Jun 06, 2014 9:29 am

Fri Apr 03, 2015 9:21 am

Hello,

Thanks for your information.
I have reproduced your issue, sorry. I have posted the issue to our dev team. We will inform you immediately when it is fixed.

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Fri Apr 03, 2015 12:32 pm

Hi,

Ok, thank you ! I will wait the answer :mrgreen:

Sincerely,

Gautier.

GAUTIER31170
 
Posts: 4
Joined: Fri Jun 06, 2014 9:29 am

Thu Apr 09, 2015 3:40 am

Hello,

Thanks for your response!
We will inform you ASAP.

Sincerely,
Sweety
E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Tue Apr 28, 2015 9:00 am

Hello,

Sorry to keep you waiting.
The new version of Spire.XLS (Spire.XLS Pack Version:7.7) solved your issue " Method DataSorter.Sort()" has been released. Please download it via link below and have a try:
http://www.e-iceblue.com/Download/downl ... t-now.html
It adds new interface to improve the sorting time consumption when sorting large numbers of data. Please refer to the code below:
Code: Select all
workbook.DataSorter.SortWay = SortedWayType.QuickSort;

If I miss something or you have other problems, please feel free to contact us.

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Tue Apr 28, 2015 3:04 pm

Hi E-ICEBLUE Team!,

Thank you very much, this is working very well on my computer ! The performances are here ! (3 Hours -> 1 Minute) :P

But only one problem, your code exemple that you gave me isn't totally true, this si the fonctional code :

Code: Select all
workbook.DataSorter.SortedWay = SortedWayType.QuickSort;


And again, sorry for my bad english, je suis meilleur en français! :mrgreen:

Sincerely,

Gautier.

GAUTIER31170
 
Posts: 4
Joined: Fri Jun 06, 2014 9:29 am

Wed Apr 29, 2015 1:52 am

Hello,

Thanks for your feedback.
Yes, you are right. I am glad to hear your issue is resolved. Sorry for my carelessness.
Please feel free to contact us, if you have any questions or needs. We are here for help.

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Return to Spire.XLS