Import sources
An import source is where SheetForge reads your sheets from. You choose it in the settings asset.
Source kinds
Select the settings asset, then set Source Mode in the Inspector. For a Google sheet, Access Mode picks between SheetsApi and ExportUrl. Settings fields lists the other fields.
Each source declares its own authoring capability through CanAuthor. That flag decides whether the source accepts write-back.
| Source | What it reads | Write-back |
|---|---|---|
LocalFile | A folder of .tsv, .csv or .xlsx files | Full |
GoogleSheet · SheetsApi | A private or shared spreadsheet, through service-account JWT auth | Full |
GoogleSheet · ExportUrl | A link-shared sheet, through its export URL | Read-only (CanAuthor = false) |
| Custom providers | Anything a plugin registers through ISheetSourceProvider | The provider's choice, through its CanAuthor flag |
Local files
SheetForge reads only the immediate children of the folder. One file is one tab, and an xlsx file contributes its sheets.
A .tsv or .csv file gives its tab the name of the file, without the extension. Items.tsv becomes the tab Items. The generated class is ItemsDatabase, and the key you load by is "Items".
Write-back is full: reflect, structure edits, and key and tab renames.
Google Sheets through the API
SheetsApi mode reads a private or shared spreadsheet with a service-account key. To create the key, follow Google Sheets setup.
Write-back is full: surgical cell writes, structure rewrites and Push.
Google Sheets through an export URL
ExportUrl mode reads a link-shared sheet and needs no auth. It is read-only. Push, reflect, structure edits and deletes are disabled, with an explanation.
This mode requires the gid map. Access modes lists the steps of an import in this mode.
Custom providers
A plugin can register a source of its own, such as a database, a REST service or an in-house format. The provider decides whether it accepts write-back.
SheetForge discovers custom source providers automatically. They appear in the same settings dropdown as the built-in sources. To write one, see Pipeline and sources.
Text file encoding
Local files must be Unicode.
| The file starts with | It is decoded as |
|---|---|
| A UTF-8 BOM | UTF-8 |
| A UTF-16 BOM, LE or BE | UTF-16 |
| No BOM | Strict UTF-8 |
A legacy non-Unicode encoding such as CP949 or Shift-JIS is rejected with UnsupportedEncoding. SheetForge does not guess at the encoding. A guess would decode differently on different machines and silently corrupt the data.
To fix the error, save the file again as UTF-8.
xlsx files
The built-in xlsx reader and writer contains zero third-party code. It adds no DLLs that can collide with other assets in your project.
The codec is shared. The same reader runs in the Unity editor and, compiled to WebAssembly, in the web app. The two hosts cannot disagree about a cell.
The reader is intentionally minimal. It reads values only and does no recalculation.
How the xlsx codec is built
The codec is hand-written OOXML. It uses only System.IO.Compression and System.Xml, with no NPOI and no ClosedXML.
How each cell is read
| Cell | Result |
|---|---|
| Formula with a cached value | Contributes the value cached in the file |
| Formula with no cached value | Rejected with UnsupportedXlsxCell |
Error cell, such as #REF! or #DIV/0! | Rejected with UnsupportedXlsxCell |
| Date-formatted cell | Read as its date, rendered yyyy-MM-dd |
| Cell that holds a tab or a newline | Rejected with UnsupportedCellCharacter |
| Cell-type code the reader does not recognize | Read as its raw stored text, not rejected |
Other number formats, merged cells and charts are not imported.
Dates
A date-formatted cell is read as its date, not as the raw serial number that the file stores. This covers both the ISO cell type and a plain number whose style is a date format. The 1900 and 1904 date systems are both honored.
Rejected cells
A formula with no cached value and an error cell are both rejected. To fix them, save the file once in Excel to cache the values, or materialize the formulas.
A tab or a newline inside a cell is rejected. Use ; for lists.
Fixed reading policy
Three interpretations are the reader's fixed policy in both hosts:
- Formulas contribute their cached values.
- Dates are read as display text.
- Formatting is ignored.
The web app's import dialog also names the interpretations that actually happened, in a How this workbook was read note.
Partial output
A source can return partial output. One broken file does not drop the readable tabs. The problems arrive as diagnostics.
Source change badge
The Data Studio tells you when the source changed after your last import.
The Studio re-reads the source on window focus, or on demand from the toolbar's source check or the menu of the last-import status on its status bar. It compares the source against the snapshot of your last import. A badge appears only when the data actually differs.
The comparison is on content, not timestamps. A sheet that was saved again or merely re-formatted shows no badge.
Clicking the badge offers to run the import. Nothing polls on a timer, and nothing imports by itself. If you are offline or unauthorized, no badge appears.
The check works the same way for every source kind: local files, export-URL sheets and the Sheets API.
The gid map
The gid map is the Gid Map field of the settings asset. It is used only in ExportUrl mode. Each entry maps a tab name to the sheet's #gid= value. That value is visible in the browser URL when the tab is selected.
ExportUrl mode requires the map. An export URL without a gid silently returns only the first tab, so SheetForge enforces the map.
- A missing map is rejected with
GoogleSheetGidMapMissing. - Duplicate gids are rejected.
SheetsApi mode discovers tabs automatically and needs no map. The settings inspector shows the map only when it is relevant.
Fill the map from the live sheet
You do not have to copy the gid values out of the browser one at a time. In the settings asset's inspector, the Google connection box of the Google Sheets section fills the map for you.
| Mode | Button | What it does |
|---|---|---|
ExportUrl | Autofill gid from live | Reads the live spreadsheet's tab list, rewrites the whole map from it, then saves the settings asset |
SheetsApi | Fetch live tab list | Shows the tabs the sheet currently has |
Autofill talks to the Sheets API. It needs a service-account key configured, even though importing in ExportUrl mode does not. Without a key, autofill stops and says so. It does not write a half-filled map.
Next steps
- Google Sheets setup
Create a service account and share your sheet with it.
- Import settings
Service-account key setup and security.
- Export
Write baked values back into sheet files.
- Sources and workbooks
The complete list of Google and xlsx limits.