Free Support Forum - aspose.com

To sort data with five keys in Aspose.Cells in Java

Hi Aspose Team,

Can we sort the data in Aspose with five keys?

Thanks,

Muin

Hi,

I think, you can use as many keys as you wish for sorting data.

Please refer to this article: Data Sorting

Hi,

We can only sort with three keys. You can see that the api provides only 3 keys to be set (attached doc with the screen shot).

Thanks,

Muin

Hi,

Thanks for your feedback.

I have added a New Feature Request against this issue. We will update you asap.

This issue has been logged as CELLSJAVA-29622.

Hi,

Please try the new fix (attached). From this fix we provide new APIs for data sorting:

1). Sorter com.aspose.cells.Cells.getDataSorter(int startRow, int startColumn, int endRow, int endColumn)

Gets data sorter to sort data in given range.

Parameters:

startRow Start row index.

startColumn Start column index.

endRow End row index.

endColumn End column index.

Returns:

Sorter object for sorting data.

2). com.aspose.cells.Sorter

Sorter for cells data sorting.

3). SortValueCriteria com.aspose.cells.Sorter.addLevel(int fieldIndex, byte sortOrder)

Adds new level to sort data by values.

See Also:
SortOrderType
Parameters:
fieldIndex the 0-based field index in the sorted range. Top-left row/column's field index is 0.
sortOrder sort order of the new value sort condition.
Returns:
sort criteria for the new level.
4). void com.aspose.cells.Sorter.sort()

Sorts the data in range of this sorter.

Code example:
Sorter sorter = cells.getDataSorter(ca.getStartRow(), ca.getStartColumn(), ca.getEndRow(), ca.getEndColumn());
sorter.addLevel(0, SortOrderType.ASCENDING);
sorter.addLevel(1, SortOrderType.DESCENDING);
sorter.addLevel(2, SortOrderType.ASCENDING);
...
sorter.sort();

Hi Team,

We have aspose-cells-2.5.4.19.jar file in our application provided by Your team as fix for below two items

1) Sorting with 5 keys

2) pivotTable.getRowFields().get(1).hideDetail

Now we have purchased license and we have received Aspose.Cells.lic file.

Please let us know will there be any change in JAR or we can use same aspose-cells-2.5.4.19.jar in our application were two fix are already there in place.

Regards,

Muin

Hi Muin,


Thanks for considering Aspose.Cells for Java,

Yes, sure you may use this fixed Jar with your license (you purchased).

For your information, when you purchase/obtain the license for any product e.g Aspose.Cells for Java or any other product provided by Aspose, you are also eligible to use new versions or bug fixes of the product that will be released in the next whole year. The license would never be expired unless you use any version/fix of the product that will be released after your expiry date.

Thank you for your understanding!


Hi,

Please also make sure, you have also added additional java libraries in your classpath. You can download them from the given link.

Hi Team,

Thanks for the inputs.

We already have below jars in classpath which we downloaded along with trial version initially and currently we are using all below 4 jars with aspose-cells-2.5.4.19.jar .

dom4j-1.6.1.jar, jsr173_1.0_api.jar,stax2-api-3.0.2.jar,woodstox-core-asl-4.0.8.jar

but we see some Dom4j_LICENSE,jsr173_LICENSE,woodstox_LICENSE.

1) Does Dom,jsr,woodstox require license which is attached in your provided zip?

2) if it is require how to install all 4? we know how to configure for aspose jar

3) if those files are not require not sure what are those files for?how to use them.

4) we see same version in your zip file for dom,jsr,woodstox,stax which we downloaded intially for trail. do we need to replace or just ignore?

Appreciate your support till now.

Regards,

Muin

Hi,

Thanks for your questions.

It appears, you already have these additional java libraries, so you don’t need to re-download them. I think, these are open source licenses, so you can safely use them without any concern.

Hi Shakeel,

How to use/install these files?

Regards,

Muin

please let us know how to install/use these files

Hi,

No, you do not need to install these files which are without extensions.

These are just text files/documents that describes license description. It is only for your own reading.

If you want to read them, you can open them in Wordpad or Notepad. Just drag these files inside Wordpad or Notepad, it will open them.

Please see the screenshot for more help.

Screenshot:

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


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

Hi Aspose Team,

Currently we are using aspose-cells-2.5.4.19.jar provided as part of fix for this bug. Do you suggest us to move to this new update which is "aspose.cells for Java 7.0.0" which has aspose-cells-7.0.0.jar, or can we continue using aspose-cells-2.5.4.19.jar?

Please note that version of Java that we are using in our application is Java 1.5 (Java 5.0)

Thanks and Regards,

Muin

Hi,


Yes, we encourage using our latest ported version v7.0.0 which has many enhancements regarding existing features with a few APIs changed/renamed. Moreover, our future versions/fixes would be based on v7.0.0.

Thank you.

Hi Aspose Team,

We are facing some issues after using the latest aspose-cells-7.0.0.jar. We observe that there are many changes in the api w.r.t aspose-cells-2.5.4.19.jar. Classes like HorizontalAlignmentType.java, AsposeLicenseException.java, Worksheets are not present in the package com.aspose.cells (hence methods like getSize(), removeSheet(), setActiveSheet() are not identifiable anymore) . As a result we are getting lot of compilation errors as we are using these methods at many places. Hence, we cannot directly move this latest release of aspose-cells-7.0.0.jar.

We have already bought the aspose licence. We would like to know if you would continue your support and provide any fixes (whenever required) in future on the aspose-cells-2.5.4.19.jar. Please advice as it has become a major concern for us.

Thanks and Regards,

Muin

Hi,

Well, you can keep using the older fixes currently. However, at the same time, we recommend you to try to migrate your application to the new version (v7.0.0), and make full test to check whether the new version can match all of your requirements. We cannot provide any fix for older versions now, it should be based on the new version API. Moreover, if you want new fixes or enhancements, then you have to upgrade to the new version.

Thanks for your understanding!

Hi,

If you will move to v7.0.0, you will need to upgrade your code and also since this is a recent fix, then it might not be available, but you can check it out.

Upgrading your code will be better for you in a sense because all new fixes will be provided according to v7.0.0 and older versions will not be supported with new fixes.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan