스프레드시트 만들기
이 페이지에서는 스프레드시트를 만드는 방법을 설명합니다.
예
스프레드시트를 만들려면 다음 예와 같이 spreadsheets 컬렉션에서 create 메서드를 사용합니다.
이 예에서는 지정된 제목이 있는 빈 스프레드시트를 만듭니다.
Google Drive 폴더로 작업하기
Sheets API를 사용하여 지정된 Drive 폴더 내에서 직접 스프레드시트를 만드는 방법은 없습니다. 기본적으로 생성된 스프레드시트는 Drive의 사용자 루트 폴더에 저장됩니다.
하지만 Drive 폴더에 파일을 저장하는 대신 다음 두 가지 방법을 사용할 수 있습니다.
- 스프레드시트가 생성된 후 Drive API의 files.update 메서드를 사용하여 특정 폴더로 이동합니다. 파일 이동에 관한 자세한 내용은 폴더 간에 파일 이동하기를 참고하세요.
- Drive API의 files.create 메서드를 사용하여
application/vnd.google-apps.spreadsheet
를 mimeType
로 지정하여 폴더에 빈 스프레드시트를 추가합니다. 파일 만들기에 관한 자세한 내용은 폴더에 파일 만들기를 참고하세요.
두 가지 방법 중 어느 쪽이든 호출을 승인하려면 적절한 Drive API 범위를 추가해야 합니다.
공유 드라이브 폴더 내에서 파일을 이동하거나 만들려면 공유 드라이브 지원 구현을 참고하세요.
Google Sheets의 셀 및 행 한도에 관해 자세히 알아보려면 Google Drive에 저장할 수 있는 파일을 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-12-21(UTC)
[null,null,["최종 업데이트: 2024-12-21(UTC)"],[[["This page provides code samples demonstrating how to create a blank Google Spreadsheet using the Sheets API in various programming languages."],["By default, new spreadsheets are created in the user's root Drive folder, requiring the Drive API to move them to a specific folder."],["You can alternatively create a blank spreadsheet directly within a folder using the Drive API, specifying the appropriate MIME type."],["Refer to the linked resources for information on Drive API scopes, shared drive support, and Google Sheets limitations."]]],["To create a spreadsheet, utilize the `spreadsheets.create` method, specifying the desired title within the `properties` field. This action generates a blank spreadsheet. By default, spreadsheets are saved in the user's root folder in Drive. To save to a specific folder, use the Drive API's `files.update` method to move it or `files.create` to directly add it to the folder. The examples given use `Apps Script`, `Java`, `Javascript`, `Node.js`, `PHP`, `Python`, and `Ruby`.\n"]]