Sorting a range

Hello,

How can I sort a cell-range ?

Thanks,

Goddeau Hendrik

Hi Hendrik,

Well, I think you are using Aspose.Cells for java, Is not it? We will provide this feature for the java version soon. Currently, only Aspose.Cells for .NET version supports this feature.

Thank you.

Yes, I'm using aspose.cells for java.

Can you please keep me informed ?

Thanks

Hi,

Ok! we will inform you here when the feature is available.

You my also keep in touch with us and try to check Aspose.Cells blogs `http://www.aspose.com/Community/Blogs/aspose.cells/default.aspx` regularly.

Thank you.

Hi,

Please try this fix. We have supported this feature.See following codes:

Workbook workbook = new Workbook();
workbook.open("F:\\FileTemp\\Book1.xls");

Cells cells = workbook.getWorksheets().getSheet(0).getCells();
DataSorter dataSorter = new DataSorter();
dataSorter.setKey1(0);
dataSorter.setOrder1(SortOrderType.DESCENDING);
dataSorter.setKey2(1);
dataSorter.setOrder2(SortOrderType.ASCENDING);
dataSorter.sort(cells,new CellArea(0,0,30,1));

workbook.save("F:\\FileTemp\\dest.xls");