Class Slicer

슬라이서

공동작업이 아닌 방식으로 범위, 차트, 피벗 테이블을 필터링하는 데 사용되는 슬라이서를 나타냅니다. 이 클래스에는 기존 슬라이서에 액세스하고 이를 수정하는 메서드가 포함되어 있습니다. 새 슬라이서를 만들려면 Sheet.insertSlicer(range, anchorRowPos, anchorColPos)를 사용합니다.

메서드

메서드반환 유형간략한 설명
getBackgroundColorObject()Color|null슬라이서의 배경 Color을 반환합니다.
getColumnPosition()Integer|null슬라이서에서 필터가 적용되는 열 위치 (슬라이서의 데이터 범위 기준)를 반환하거나, 열 위치가 설정되지 않은 경우 null을 반환합니다.
getContainerInfo()ContainerInfo슬라이서가 시트에서 배치된 위치에 관한 정보를 가져옵니다.
getFilterCriteria()FilterCriteria|null슬라이서의 필터 기준을 반환합니다. 필터 기준이 설정되지 않은 경우 null를 반환합니다.
getRange()Range슬라이서가 적용된 데이터 범위를 가져옵니다.
getTitle()String슬라이서의 제목을 반환합니다.
getTitleHorizontalAlignment()String제목의 가로 정렬을 가져옵니다.
getTitleTextStyle()TextStyle슬라이서 제목의 텍스트 스타일을 반환합니다.
isAppliedToPivotTables()Boolean지정된 슬라이서가 피벗 테이블에 적용되었는지 여부를 반환합니다.
remove()void슬라이서를 삭제합니다.
setApplyToPivotTables(applyToPivotTables)Slicer지정된 슬라이서를 워크시트의 피벗 테이블에 적용할지 여부를 설정합니다.
setBackgroundColor(color)Slicer슬라이서의 배경색을 설정합니다.
setBackgroundColorObject(color)Slicer슬라이서의 배경 Color를 설정합니다.
setColumnFilterCriteria(columnPosition, filterCriteria)Slicer슬라이서의 열 색인과 필터링 기준을 설정합니다.
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)Slicer시트에 슬라이서가 표시되는 위치를 설정합니다.
setRange(rangeApi)Slicer슬라이서가 적용되는 데이터 범위를 설정합니다.
setTitle(title)Slicer슬라이서의 제목을 설정합니다.
setTitleHorizontalAlignment(horizontalAlignment)Slicer슬라이서의 제목 가로 정렬을 설정합니다.
setTitleTextStyle(textStyle)Slicer슬라이서의 텍스트 스타일을 설정합니다.

자세한 문서

getBackgroundColorObject()

슬라이서의 배경 Color을 반환합니다.

리턴

Color|null: 이 슬라이서의 배경색입니다. 색상이 설정되지 않은 경우 null을 반환합니다.

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getColumnPosition()

슬라이서에서 필터가 적용되는 열 위치 (슬라이서의 데이터 범위 기준)를 반환하거나, 열 위치가 설정되지 않은 경우 null을 반환합니다. 필터와 유사한 열의 1 기반 색인 위치여야 합니다.

리턴

Integer|null - 이 슬라이서의 열 위치입니다.

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getContainerInfo()

슬라이서가 시트에서 배치된 위치에 관한 정보를 가져옵니다.

리턴

ContainerInfo - 슬라이서의 컨테이너 위치를 포함하는 객체입니다.

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getFilterCriteria()

슬라이서의 필터 기준을 반환합니다. 필터 기준이 설정되지 않은 경우 null를 반환합니다.

리턴

FilterCriteria|null - 이 슬라이서의 필터 기준입니다.

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getRange()

슬라이서가 적용된 데이터 범위를 가져옵니다.

리턴

Range - 슬라이서 범위입니다.

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getTitle()

슬라이서의 제목을 반환합니다.

리턴

String - 이 슬라이서(연결용)

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getTitleHorizontalAlignment()

제목의 가로 정렬을 가져옵니다.

리턴

String - 이 슬라이서 제목의 가로 정렬입니다.

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getTitleTextStyle()

슬라이서 제목의 텍스트 스타일을 반환합니다.

리턴

TextStyle - 이 슬라이서의 제목의 텍스트 스타일입니다.

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

isAppliedToPivotTables()

지정된 슬라이서가 피벗 테이블에 적용되었는지 여부를 반환합니다.

리턴

Boolean: 이 슬라이서가 피벗 테이블에 적용된 경우 true, 그렇지 않은 경우 false

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

remove()

슬라이서를 삭제합니다.

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

setApplyToPivotTables(applyToPivotTables)

지정된 슬라이서를 워크시트의 피벗 테이블에 적용할지 여부를 설정합니다.

매개변수

이름유형설명
applyToPivotTablesBoolean이 슬라이서가 피벗 테이블에 적용되어야 하는지 여부를 지정합니다.

리턴

Slicer - 이 슬라이서(연결용)

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

setBackgroundColor(color)

슬라이서의 배경색을 설정합니다. null 값은 배경색을 재설정합니다.

매개변수

이름유형설명
colorStringCSS 표기법 (예: '#ffffff')의 이 슬라이서의 새 배경색입니다.

리턴

Slicer - 이 슬라이서(연결용)

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

setBackgroundColorObject(color)

슬라이서의 배경 Color를 설정합니다. null 값은 배경색을 재설정합니다.

매개변수

이름유형설명
colorColor이 슬라이서의 새 배경색입니다.

리턴

Slicer - 이 슬라이서(연결용)

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

setColumnFilterCriteria(columnPosition, filterCriteria)

슬라이서의 열 색인과 필터링 기준을 설정합니다. null 값은 슬라이서 필터를 재설정합니다.

매개변수

이름유형설명
columnPositionInteger이 슬라이서의 새 열 위치입니다.
filterCriteriaFilterCriteria이 슬라이서의 새 필터 기준입니다.

리턴

Slicer - 이 슬라이서(연결용)

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)

시트에 슬라이서가 표시되는 위치를 설정합니다. 고정 행 및 열 위치 색인은 1부터 시작합니다.

매개변수

이름유형설명
anchorRowPosInteger슬라이서의 상단이 이 행에 고정됩니다.
anchorColPosInteger슬라이서의 상단이 이 열에 고정됩니다.
offsetXInteger셀 모서리에서 가로 오프셋(픽셀)입니다.
offsetYInteger셀 모서리에서 세로 오프셋(픽셀)입니다.

리턴

Slicer - 이 슬라이서(연결용)

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

setRange(rangeApi)

슬라이서가 적용되는 데이터 범위를 설정합니다.

매개변수

이름유형설명
rangeApiRange이 슬라이서의 새 범위입니다.

리턴

Slicer - 이 슬라이서(연결용)

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

setTitle(title)

슬라이서의 제목을 설정합니다. 제목이 비어 있으면 제목이 기본값으로 재설정됩니다.

매개변수

이름유형설명
titleString이 슬라이서의 새 제목입니다.

리턴

Slicer - 이 슬라이서(연결용)

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

setTitleHorizontalAlignment(horizontalAlignment)

슬라이서의 제목 가로 정렬을 설정합니다. null 값은 정렬을 재설정합니다.

매개변수

이름유형설명
horizontalAlignmentString이 슬라이서 제목의 새로운 가로 정렬입니다.

리턴

Slicer - 이 슬라이서(연결용)

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

setTitleTextStyle(textStyle)

슬라이서의 텍스트 스타일을 설정합니다.

매개변수

이름유형설명
textStyleTextStyle슬라이서 제목의 새 텍스트 스타일입니다.

리턴

Slicer - 이 슬라이서(연결용)

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

지원 중단된 메서드