powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Java [игнор отключен] [закрыт для гостей] / Сортировка JXL
2 сообщений из 2, страница 1 из 1
Сортировка JXL
    #37900584
gaval
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Вопрос такой. Есть ли возможность сортировки отдельно взятого столбца средствами JXL?
...
Рейтинг: 0 / 0
Сортировка JXL
    #37901114
Фотография ivanov-void
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
gaval,

Есть возможность сортировки записей по столбцу-

http://www.teamdev.com/downloads/jexcel/docs/JExcel-PGuide.html#AEN527 ...
7.4. Sorting a Range

JExcel provides functionality for sorting rows or columns in a range of cells. For this purpose, use the Range.sort() method. It takes a column name (for example, "A", "D", "AB") for sorting rows by the values of the specified column and a row number (for example, 1, 4, 100) for sorting columns by the values of the specified row.

For sorting values in the ascending order, set the ascending argument to true (or false if otherwise). If the caseSensitive argument is true, case-sensitive sorting will be done.

The following sample demonstrates the technique of sorting ranges:

//Getting a necessary range
Range range = worksheet.getRange("A1:D5");

//Sorting the range by column "A", in the ascending order, case-sensitive
range.sort("A", true, true);

//Sorting the range by the third row, in the descending order, case-sensitive
range.sort(3, false, true);

For the complete sample, please refer to the following file:
...
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / Java [игнор отключен] [закрыт для гостей] / Сортировка JXL
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]