• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Java, transfer excel cell contents into array

ckwolfe

Junior Member
I have created a "numbers" file (mac version of excel) of titles that is not in abc order and wish to put it in abc order from a program i have created in java. The only problem is the list has over 500 elements so doing it manually would take ages. Is there a way to read in the contents of each cell into an array so i can just sort the array and return it back to the numbers program without inputing each cell content manually? Thank you for any help.

Cory
 
An alternative if for whatever reason you didn't sort it in Excel itself as Markbnj suggested, is to store the files in one of the Java Collections and use class Collections static sorting methods to alphabetize. If they are not being stored as String or some other data type included in Java, though, you will need to implement the Comparable interface for the data type iirc.

Mark's way is easier though.
 
Back
Top