Could you please zip and attach the input Excel file and the output Excel file (created by Aspose.Cells after implementing data sorting) for reference? Also, please provide your expected Excel file containing your desired sorted data. We will evaluate your issue and look into it soon.
Please note, Datasorter.Key1 represents the absolute position(column index in your case). When you specified it as 0, it means to sort column A. Please change your code like:
It seems it filter only column ‘R’ but not the rest
This is my code:
CellArea range = CellArea.CreateCellArea(“R”, “R” + wsTaxonomien.Cells.MaxRow);
wsTaxonomien.Workbook.DataSorter.Key1 = range.EndColumn;
wsTaxonomien.Workbook.DataSorter.Order1 = SortOrder.Ascending;
wsTaxonomien.Workbook.DataSorter.Sort(wsTaxonomien.Cells, range);
I just run this line of VBA code in outputBeforeSort.xlsx
ActiveSheet.Range(“$R:$R”).CurrentRegion.Sort Key1:=Range(“$R:$R”), DataOption1:=xlSortTextAsNumbers, Header:=xlYes
and get the correct result
with the c# code above the other columns content are different