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.
Mon Apr 23, 2018 1:43 pm
Hello,
It may be that the sorting does not work with free Spire.XLS.
Dear Christian
-
Chrislie81
-
- Posts: 1
- Joined: Mon Apr 23, 2018 1:37 pm
Tue Apr 24, 2018 2:05 am
Hello Christian,
Thanks for your feedback. I tested the functionality of sorting, it worked fine with the free version(
Free Spire.XLS for .NET Version:8.3). Please refer to the below code snippet. If you still encounter the issue, please share us with your input Excel file.
- Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile(@"Test.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//append the sort column index and order by attributes
workbook.DataSorter.SortColumns.Add(1, OrderBy.Ascending);
//set the range to sort.
workbook.DataSorter.Sort(worksheet["A1:B11"]);
//save and launch the file5
workbook.SaveToFile(@"test.xlsx", ExcelVersion.Version2010);
Best regards,
Simon
E-iceblue support team
-
Simon.yang
-
- Posts: 620
- Joined: Wed Jan 11, 2017 2:03 am
Thu Apr 26, 2018 7:53 am
Hello,
Greeting from E-iceblue.
How is the issue going?
We will appreciate it if you could give us some feedback.
Best regards,
Simon
E-iceblue support team
-
Simon.yang
-
- Posts: 620
- Joined: Wed Jan 11, 2017 2:03 am