Class SortSpec
자세한 문서
getBackgroundColor()
정렬에 사용되는 배경색을 반환하거나 배경색이 없는 경우 null
을 반환합니다.
리턴
Color
: 배경 색상입니다.
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getDataSourceColumn()
정렬 사양이 작동하는 데이터 소스 열을 가져옵니다. 이 정렬 사양이 데이터 소스 열에 작동하지 않으면 null
를 반환합니다.
리턴
DataSourceColumn
: 정렬 사양이 적용되는 데이터 소스 열입니다.
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getDimensionIndex()
로컬 필터에 연결되어 있지 않은 경우 차원 색인 또는 null
을 반환합니다.
리턴
Integer
- 측정기준 색인입니다.
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getForegroundColor()
정렬에 사용되는 전경 색상 또는 색상이 없는 경우 null
를 반환합니다.
리턴
Color
: 전경 색상입니다.
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getSortOrder()
정렬 순서를 반환합니다.
리턴
SortOrder
- 정렬 순서입니다.
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
isAscending()
정렬 순서가 오름차순인지 여부를 반환합니다.
리턴
Boolean
: 정렬 순서가 오름차순이면 true
이고, 그렇지 않으면 false
입니다.
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-12-02(UTC)
[null,null,["최종 업데이트: 2024-12-02(UTC)"],[[["`SortSpec` defines the specifications for sorting data, such as sort order, colors, and the data source."],["It provides methods to retrieve information about the sort specification, including background and foreground colors, sort order, and the data source column being used."],["You can determine if the sort order is ascending using the `isAscending()` method and obtain the dimension index with `getDimensionIndex()`."],["All methods within `SortSpec` require authorization with specific scopes related to spreadsheet access."]]],["SortSpec defines the criteria for sorting data. Key actions include retrieving the background and foreground colors used in sorting, if any. It fetches the data source column being sorted, or returns null if not present. It can retrieve the dimension index if linked to a filter. The sort order itself, along with whether the sorting is ascending, can also be obtained using the methods `getSortOrder()` and `isAscending()` respectively.\n"]]