의견 보내기
Class 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)
지정된 슬라이서를 워크시트의 피벗 테이블에 적용할지 여부를 설정합니다.
매개변수
이름 유형 설명
apply To Pivot TablesBoolean이 슬라이서가 피벗 테이블에 적용되어야 하는지 여부를 지정합니다.
리턴
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 값은 슬라이서 필터를 재설정합니다.
매개변수
이름 유형 설명
column PositionInteger이 슬라이서의 새 열 위치입니다.
filter CriteriaFilter Criteria 이 슬라이서의 새 필터 기준입니다.
리턴
Slicer - 이 슬라이서(연결용)
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setPosition(anchorRowPos, anchorColPos, offsetX, offsetY)
시트에 슬라이서가 표시되는 위치를 설정합니다. 고정 행 및 열 위치 색인은 1부터 시작합니다.
매개변수
이름 유형 설명
anchor Row PosInteger슬라이서의 상단이 이 행에 고정됩니다.
anchor Col PosInteger슬라이서의 상단이 이 열에 고정됩니다.
offsetXInteger셀 모서리에서 가로 오프셋(픽셀)입니다.
offsetYInteger셀 모서리에서 세로 오프셋(픽셀)입니다.
리턴
Slicer - 이 슬라이서(연결용)
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setRange(rangeApi)
슬라이서가 적용되는 데이터 범위를 설정합니다.
매개변수
이름 유형 설명
range ApiRange 이 슬라이서의 새 범위입니다.
리턴
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 값은 정렬을 재설정합니다.
매개변수
이름 유형 설명
horizontal AlignmentString이 슬라이서 제목의 새로운 가로 정렬입니다.
리턴
Slicer - 이 슬라이서(연결용)
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
setTitleTextStyle(textStyle)
슬라이서의 텍스트 스타일을 설정합니다.
매개변수
이름 유형 설명
text StyleText Style 슬라이서 제목의 새 텍스트 스타일입니다.
리턴
Slicer - 이 슬라이서(연결용)
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
https://www.googleapis.com/auth/spreadsheets.currentonly
https://www.googleapis.com/auth/spreadsheets
지원 중단된 메서드
getBackgroundColor()
지원 중단 되었습니다. getBackgroundColorObject() 로 대체됨
슬라이서의 배경색을 CSS 표기법 (예: '#ffffff')으로 반환합니다.
리턴
String|null - 이 슬라이서의 배경색입니다. 색상이 설정되지 않은 경우 null을 반환합니다.
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
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 계열사의 등록 상표입니다.
최종 업데이트: 2026-04-13(UTC)
의견을 전달하고 싶나요?
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2026-04-13(UTC)"],[],["Slicers filter ranges, charts, and pivot tables. Key actions include: retrieving and modifying slicer properties like background color, column position, filter criteria, data range, and title. Slicers can be positioned and have their applicability to pivot tables set. You can also manage the title's horizontal alignment and text style. Slicers are created using `Sheet.insertSlicer`. The method to remove a slicer is `remove()`. The old method to obtain background colors is deprecated and should be replaced by `getBackgroundColorObject()`.\n"]]