Aspose.cells Sorting - sort anything that looks like a number- as a number

Hi,

I am trying to sort a column which has number and string, I need to sort this column.

In Excel, I use Sort anything that looks like a number, as a number, that works.

Do we have this option in aspose.cells?

Thanks

Hi,


Thanks for your posting and using Aspose.Cells.

We were able to observe this issue and found it is not available, so we have logged it as a New Feature request in our database to support it in our future releases if possible.

This issue has been logged as a New Feature request in our database as

  • CELLSNET-45246 - Implement Sort Warning feature - Sort anything that looks like a number

I have also attached sample sort excel file and the screenshot showing the interface of this feature in MS-Excel 2013 for a reference.

Hi,

Thanks for using Aspose.Cells.

This is to inform you that we have fixed your issue CELLSNET-45246 now. We will soon provide the fix after performing QA and including other enhancements and fixes.
Hi,

Thanks for using Aspose.Cells.

Please download and try the following latest fix

Aspose.Cells for .NET v17.3.5 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.3.5 (.NET 4.0) compiled in .NET Framework 4.0.

and let us know your feedback.

C#
Workbook workbook = new Workbook(Constants.sourcePath + "CellsNet45244.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Create your cell area
CellArea ca = CellArea.CreateCellArea("A1", "B4");

//Create your sorter
DataSorter sorter = workbook.DataSorter;

//Find the index, since we want to sort by column A, so we should know
//the index for sorter
int idx = CellsHelper.ColumnNameToIndex("A");

//Add key in sorter, it will sort in Ascending order
sorter.AddKey(idx, SortOrder.Ascending);
sorter.SortAsNumber = true;

//Perform sort
sorter.Sort(worksheet.Cells, ca);

The issues you have found earlier (filed as CELLSNET-45246) have been fixed in Aspose.Cells for .NET 17.4.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.