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.

Tue Jan 10, 2017 12:29 pm

Hello,

I'm having problems with Workbook DataSorter sort method.

Can you explain me what is the reason for "Spire.Xls.Core.Spreadsheet.XlsWorkbook.2" exception that i get in this sentence?

string finalRangeStr = "A" + (sheet.FirstRow + 3).ToString() + ":F" + sheet.LastRow.ToString();
workbook.DataSorter.SortColumns.Add(0, OrderBy.Ascending);
workbook.DataSorter.Sort(sheet.Range[finalRangeStr]);

Maybe finalRangeStr is too big? Should I change finalRangeStr and use two int indexes?

Thanks in advance!

javierserra
 
Posts: 4
Joined: Fri Dec 09, 2016 9:55 am

Wed Jan 11, 2017 2:09 am

Dear javierserra,

Thanks for your inquiry.
I have tested the scenario with the latest Spire.XLS Pack Hotfix Version:7.11.34. But didn't encounter any issue.
Please try to use this version, if there still is issue, please provide us the sample file which has that issue to help us do an investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Jan 11, 2017 9:16 am

it seems that problem is fixed with 7.11 version. Thank you very much!

javierserra
 
Posts: 4
Joined: Fri Dec 09, 2016 9:55 am

Wed Jan 11, 2017 9:20 am

Dear javierserra,

Thanks for your feedback.
Please feel free to contact us if there is any issue. We are here for help.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS