Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Java [игнор отключен] [закрыт для гостей] / Сортировка JXL / 2 сообщений из 2, страница 1 из 1
01.08.2012, 15:31:17
    #37900584
gaval
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Сортировка JXL
Вопрос такой. Есть ли возможность сортировки отдельно взятого столбца средствами JXL?
...
Рейтинг: 0 / 0
02.08.2012, 00:08:46
    #37901114
ivanov-void
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Сортировка JXL
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
Форумы / Java [игнор отключен] [закрыт для гостей] / Сортировка JXL / 2 сообщений из 2, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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