Hello Aspose Team,
I’m currently using Aspose.Cells version 4.8.0.0. After calling the ImportDataTable method, I apply the styles in certain columns as shown below.
Style style;
StyleFlag styleFlag;
style = workBook.Styles[workBook.Styles.Add()];
style.Number = 7;
styleFlag = new StyleFlag();
styleFlag.NumberFormat = true;
workSheet.Cells.Columns[16].ApplyStyle(style, styleFlag);
The exported excel file does not sort properly. Formatting is in currency but sorting is like this:
100
100
100
15
160
160
I tried adding parameters of the ImportDataTable like this ImportDataTable(data, true, 0, 0, true, true), making converttostring as true. This worked for the currency however the DateTime columns were affected, format in excel became “General”.
Regards,
Joyce R
Hi,
Since you are using some older version of the product and we are not sure if this is an issue or not in your current APIs set. Neither we can evaluate your issue using your older version (v4.8.0). Your data might be in strings instead of numeric but we are not sure about it. We can only recommend you to kindly upgrade to and use latest version of the product (e.g Aspose.Cells for .NET v9.0.0 (latest)), it should fix your issue.
For your information, over the years, we included many enhancements (regarding existing features) with other fixes and supported some new features. We have made the product more robust and feature rich APIs set now. You got to update your code (in accordance with latest APIs set) as we made some changes with existing APIs. We have reorganized the APIs structure and moved certain APIs to their corresponding namespaces since the release of v5.0.0.
We recommend you to kindly see and browse Aspose.Cells for .NET Docs for your reference:
If you still find the issue with v9.0.0, kindly do provide us sample console application (runnable), zip the project and post us here, we will check it soon. Please use dynamic dataset/ datatable in your code to remove any interdependencies for data sources, so we could evaluate/run your project to figure out your issue soon.
Thank you.