グーグルのスプレッドシート API を使用した Python スクリプトを生成し、特定のデータをスプレッドシートに書き込む
```
from google.oauth2.service_account import Credentials
from googleapiclient import discovery

# Set up credentials and API client
creds = Credentials.from_service_account_file('path/to/service_account_key.json')
service = discovery.build('sheets', 'v4', credentials=creds)

# Define spreadsheet ID and range
spreadsheet_id = 'your_spreadsheet_id'
range_ = 'Sheet1!A1:B2'

# Define data to write
data = [
    ['header1', 'header2'],
    ['row1_col1', 'row1_col2'],
    ['row2_col1', 'row2_col2']
]

# Write data to spreadsheet
body = {
    'values': data
}
result = service.spreadsheets().values().update(
    spreadsheetId=spreadsheet_id, range=range_,
    valueInputOption='RAW', body=body).execute()
```