sorting excel rows based on the values of a column using Java

Viewed 23

I am generating an excel using my java program . I want that excel file to be sorted based on the values of a column . The type of these values is String

can anyone help?

1 Answers

Suppose, you are generating excel like CSV file, then you can do sort the row on based of the value of a column

First,

Create a java class that holds the column values as an object, then stored these objects into a List collection.

Then create a custom Comparator to sort that List collection and write list object into excel file.

Related