We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Sorting & Dynamic formulas

Hi,

I would like to know if sorting columns is supported with dynamic formulas (smart markers) ?
I tried to use the following syntax but it doesn’t work :

&=&=IF(K{r}=0,-1,(L{r}-F{r})/F{r})~(ascending:1)

Thanks in advance.

Hi,


Well, I am not sure how it will help you to embed sorting parameter in dynamic formulas, and furthermore how it will be processed logically. Well, for your information, “&=&=RepeatDynamicFormula” will repeatedly insert formulas accordingly with the row numbers based on values of the data table, e.g. “&=&=B{r}” --> the formulas might be =B1, B2, B3,… and so on, where r refers to the current row where the smart marker is inserted.

It would be better, if you add sorting parameter into the individual smart markers inserted on your source columns, e.g K, L, etc.

Thank you.

Thanks for your response.

I need to sort on this computed column, sorting on the source columns isn’t really helpful for this report.
Do you know if it’s possible to preserve “Custom Sort” functionality in a generated excel file based on a template?
I can then use this alternative instead of smart markers options ( {ascending:n} )

Regards,
Mathieu

Hi,


Well, I think you may use data sorting feature (of Excel) by using Aspose.Cells APIs after the markers are processed. You would also need to call call Workbook.CalculateFormula first() after processing the markers and before sorting data. See the Data Sorting document for reference:
https://docs.aspose.com/cells/net/data-sorting/

We will also look into it whether we can support sorting parameter in smart markers dynamic formulas. I have logged a ticket for your feature request with an id: CELLSNET-31347.

Once we have any update, we will update you soon.

Thank you.

Hi,


Please try the new fix:Please download: Aspose.Cells for .NET v7.0.2.1. If you still have any problem, please give us sample project, we will check it soon.

Thank you for this fix, sorting with formulas works well now !

The issues you have found earlier (filed as 31347) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as 31347) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(1)