Google Sheets Input
Wiener can use Google Sheets spreadsheets as table input instead of Excel files.
Google Sheets input is available in the currently sold Unity Asset edition 1.0.0. The Standalone edition is Coming Soon and is not part of the current product.
Overall Flow
Google Cloud
Create service account → Issue JSON key
↓
Share the spreadsheet with the service account email (Viewer permission)
↓
Add google_sheets settings to the settings file
↓
Specify the spreadsheet URL in the YAML input_path
↓
Run conversion (data is fetched automatically through XLSX export)
Setup Steps
1. Google Cloud Setup
Complete the following steps in Google Cloud.
If you use the Unity Asset version, see Google Sheets Settings after completing the Google Cloud setup.
Create a Service Account
Create a dedicated service account for Wiener. Do not grant it a Google Cloud project role; allow access only to the target spreadsheets through the sharing settings described below.
Create an Authentication JSON Key
Create a JSON key for the service account and download it. This file is the credential; its filename is not fixed.
Important
Treat the credential JSON like a password. Store it outside the Unity project's Assets directory and outside the Git repository, and do not share the JSON file between users.
If a key is accidentally committed, deleting the file is not enough. Immediately disable and delete the key in Google Cloud. See Google's best practices.
Share the Spreadsheet
For input-only use, share the target spreadsheet with the service account email address (xxx@xxx.iam.gserviceaccount.com) as a Viewer. Grant edit access to that spreadsheet only when using a feature that creates or updates translation sheets.
2. Add google_sheets to the Settings File
google_sheets:
credential_path: "<absolute-path-to-credential-json>"
For the Unity Asset version, follow Google Sheets Settings and select the external JSON file in Setting Editor.
3. Specify the Spreadsheet URL in the YAML input_path
Set the spreadsheet URL directly as the path value.
header:
input_path:
- path: https://docs.google.com/spreadsheets/d/xxxxxxxx/edit#gid=0
sheet: SystemText
row: 5
The gid (sheet ID) in the URL is ignored. The sheet name specified in the sheet field is used instead.
You can mix local Excel files and Google Sheets in the same YAML.
header:
input_path:
- path: item/item.xlsm
- path: https://docs.google.com/spreadsheets/d/xxxxxxxx/edit#gid=0
sheet: Item
row: 5
Export Size Limit and Splitting Files
Google Sheets input downloads each spreadsheet as xlsx through the Google Drive API export feature, then reads the downloaded xlsx locally. Drive API export results have a 10 MB limit, so fetching fails if a single spreadsheet becomes too large.
For large tables, split the data into multiple spreadsheets by use case or ID range. If the split spreadsheets use the same sheet name, you can load them from one YAML by listing multiple URLs in input_path.
For example, split the Item sheet into two spreadsheets.
| ItemMaster_A | ItemMaster_B | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Keep the spreadsheet names and URLs.
| Spreadsheet | URL |
|---|---|
| ItemMaster_A | https://docs.google.com/spreadsheets/d/aaaaaaaa/edit#gid=0 |
| ItemMaster_B | https://docs.google.com/spreadsheets/d/bbbbbbbb/edit#gid=0 |
In YAML, specify both URLs for the same sheet: Item.
header:
input_path:
- path: https://docs.google.com/spreadsheets/d/aaaaaaaa/edit#gid=0
- path: https://docs.google.com/spreadsheets/d/bbbbbbbb/edit#gid=0
sheet: Item
row: 5
source_type: Normal
container_type: List
name: Item
output_path: item
With this setup, Wiener reads the Item sheet from both ItemMaster_A and ItemMaster_B and treats them as one YAML definition.
CSV Output
When CSV is included in output_format, normal data loaded from Google Sheets is written to the following path.
csv/GoogleSheets/{header.output_path}/{header.name}_{sheet}_{spreadsheetId}.csv
source_type: Enum EnumBase data is handled separately. Even when loaded from Google Sheets, it is written to csv/EnumBase and is not written under csv/GoogleSheets.
Team Development Workflow
Do not distribute the credential JSON through Git, chat, email, or a shared folder. When practical, separate service accounts or keys by purpose and user, and let each user set their local credential_path.
For CI/CD, the recommended approach is to write the JSON key from a Secret to a temporary file, then set credential_path to that file path.
Notes
- Google Sheets input is available in the currently sold Unity Asset version. The Standalone version is Coming Soon
- Wildcards are not supported for Google Sheets input (local Excel input only)
- The
gidin the URL is ignored. Always specify the sheet name using thesheetfield - Google Sheets input downloads each spreadsheet as an xlsx export and reads it locally
- xlsx export has a 10 MB limit. Split large tables into multiple spreadsheets
Related
- Unity Asset Setting Editor — edit
google_sheetssettings - YAML Header Definition —
input_pathspecification - Localization — combining with multi-language support
- Unity Asset Google Sheets Settings — store and register the credential JSON safely