# Google Sheets

## 아이템 블록

구글의 Sheets 에 데이터를 등록하는 아이템 블록입니다. 생성한 데이터를 구글 Sheets 에 등록하는 방법은 **새파일에 쓰기, 갱신하기, 이어쓰기, 키 매칭** 의 방식이 있습니다.

<figure><img src="/files/EoQ9r9FSJ6HQvPar2UwF" alt=""><figcaption></figcaption></figure>

## 설정 팝업

<figure><img src="/files/2Jdrjytp3upYnTWOm8Bk" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/0pBHn6iHfahJQlcArVU3" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/3lEVe6QmYUM4BafK28Nb" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/H4rUGnRvPCSMSk0Mz9kk" alt=""><figcaption></figcaption></figure>

## 설정 필드

### <mark style="color:blue;">쓰기방식 : 새 파일에 쓰기</mark>

**년도 + 월 + 날짜 + 시간 + 분 + 초 + "-apidrag-gen"** 포맷으로 새로운 Sheets 파일을 생성하고 데이터를 등록합니다.

#### 입력 Data 지정

Sheets 에 등록 할 데이터를 지정합니다. 지정 된 데이터는 \[\[col1, col2, col3],\[col1, col2, col3],\[col1, col2, col3]] 형태의 배열이어야 합니다.

### <mark style="color:blue;">쓰기방식 : 갱신하기</mark>

지정한 구글 Sheets 의 내용을 새로운 내용으로 갱신합니다.

#### Spreadsheet ID

<figure><img src="/files/Kcb7NasGoPmhlOCV94ct" alt=""><figcaption></figcaption></figure>

구글 Sheets 서비스를 실행하면 위 이미지와 같이 인터넷 브라우저의 주소창에서 ID를 확인할 수 있습니다.

#### Sheet 이름

<figure><img src="/files/tp53REm0e9QhYgLGBSAN" alt=""><figcaption></figcaption></figure>

구글 Sheets 하단 왼쪽에 보시면 위 이미지와 같은 Sheet 이름을 확인하실 수 있습니다.

#### 입력 Data 지정(생략)

### <mark style="color:blue;">쓰기방식 : 이어쓰기</mark>

지정한 구글 Sheets 의 내용의 가장 하단에 새로운 데이터를 이어 붙입니다.

#### Spreadsheet ID(생략)

#### Sheet 이름(생략)

#### 입력 Data 지정(생략)

### <mark style="color:blue;">쓰기방식 : 키 매칭</mark>

지정한 구글 Sheets 의 **키 컬럼**의 값과 새로운 데이터의 **매핑 키 컬럼**의 값을 비교하여 **ROW 기준**으로 맞추어서 지정한 삽입위치 컬럼에 데이터를 등록합니다.

#### Spreadsheet ID(생략)

#### Sheet 이름(생략)

#### Sheet 키 컬럼

새롭게 만들어진 데이터와 비교되어 질 원본 데이터의 컬럼을 의미합니다.&#x20;

#### 삽입 위치 컬럼

Sheet 키 컬럼의 데이터와 일치하는 새로운 데이터의 ROW 를 등록할 때, 삽입 위치 컬럼 위치에서 부터 등록합니다.

#### 입력 Data 지정(생략)

#### 매핑 키 컬럼 Index

Sheet 키 컬럼과 비교할 새롭게 만들어진 데이터의 컬럼 Index 입니다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apidrag.com/base-control/output-data/google-sheets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
