Method: spreadsheets.get
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
지정된 ID의 스프레드시트를 반환합니다. 호출자가 스프레드시트 ID를 지정해야 합니다.
기본적으로 그리드 내 데이터는 반환되지 않습니다. 다음 두 가지 방법 중 하나로 그리드 데이터를 포함할 수 있습니다.
대용량 스프레드시트의 경우 원하는 특정 스프레드시트 필드만 검색하는 것이 좋습니다.
스프레드시트 데이터의 하위 집합만 검색하려면 ranges
URL 매개변수를 사용합니다. 범위는 A1 표기법을 사용하여 지정합니다. 단일 셀 (예: A1
) 또는 여러 셀 (예: A1:D5
)을 정의할 수 있습니다. 동일한 스프레드시트 내의 다른 시트에서 셀을 가져오거나 (예: Sheet2!A1:C4
) 한 번에 여러 범위를 검색할 수도 있습니다 (예: ?ranges=A1:D5&ranges=Sheet2!A1:C4
). 범위를 제한하면 요청된 범위와 교차하는 스프레드시트의 부분만 반환됩니다.
HTTP 요청
GET https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
spreadsheetId |
string
요청할 스프레드시트입니다.
|
쿼리 매개변수
매개변수 |
ranges[] |
string
스프레드시트에서 가져올 범위입니다.
|
includeGridData |
boolean
그리드 데이터를 반환해야 하는 경우 true입니다. 요청에 필드 마스크가 설정된 경우 이 매개변수는 무시됩니다.
|
excludeTablesInBandedRanges |
boolean
밴딩된 범위에서 테이블을 제외해야 하는 경우 true입니다. 설정되지 않은 경우 false입니다.
|
응답 본문
성공한 경우 응답 본문에 Spreadsheet
의 인스턴스가 포함됩니다.
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/spreadsheets
https://www.googleapis.com/auth/spreadsheets.readonly
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-04-30(UTC)
[null,null,["최종 업데이트: 2025-04-30(UTC)"],[],[],null,["# Method: spreadsheets.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReturns the spreadsheet at the given ID. The caller must specify the spreadsheet ID.\n\nBy default, data within grids is not returned. You can include grid data in one of 2 ways:\n\n- Specify a [field mask](https://developers.google.com/workspace/sheets/api/guides/field-masks) listing your desired fields using the `fields` URL parameter in HTTP\n\n- Set the [includeGridData](/workspace/sheets/api/reference/rest/v4/spreadsheets/get#body.QUERY_PARAMETERS.include_grid_data) URL parameter to true. If a field mask is set, the `includeGridData` parameter is ignored\n\nFor large spreadsheets, as a best practice, retrieve only the specific spreadsheet fields that you want.\n\nTo retrieve only subsets of spreadsheet data, use the [ranges](/workspace/sheets/api/reference/rest/v4/spreadsheets/get#body.QUERY_PARAMETERS.ranges) URL parameter. Ranges are specified using [A1 notation](https://developers.google.com/workspace/sheets/api/guides/concepts#cell). You can define a single cell (for example, `A1`) or multiple cells (for example, `A1:D5`). You can also get cells from other sheets within the same spreadsheet (for example, `Sheet2!A1:C4`) or retrieve multiple ranges at once (for example, `?ranges=A1:D5&ranges=Sheet2!A1:C4`). Limiting the range returns only the portions of the spreadsheet that intersect the requested ranges.\n\n### HTTP request\n\n`GET https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------------|--------------------------------------|\n| `spreadsheetId` | `string` The spreadsheet to request. |\n\n### Query parameters\n\n| Parameters ||\n|-------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| `ranges[]` | `string` The ranges to retrieve from the spreadsheet. |\n| `includeGridData` | `boolean` True if grid data should be returned. This parameter is ignored if a field mask was set in the request. |\n| `excludeTablesInBandedRanges` | `boolean` True if tables should be excluded in the banded ranges. False if not set. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Spreadsheet](/workspace/sheets/api/reference/rest/v4/spreadsheets#Spreadsheet).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive`\n- `https://www.googleapis.com/auth/drive.readonly`\n- `https://www.googleapis.com/auth/drive.file`\n- `https://www.googleapis.com/auth/spreadsheets`\n- `https://www.googleapis.com/auth/spreadsheets.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]