> For the complete documentation index, see [llms.txt](https://giantgrey.gitbook.io/databrain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://giantgrey.gitbook.io/databrain/guides/import.md).

# Import

To make sure Databrain recognizes the correct data types you will need to setup the spreadsheet correctly.

<figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2FxRonQeL6ije6Zkgj6kfC%2Fspreadsheet.png?alt=media&amp;token=92568032-3c88-406a-bded-8b77a5b9e90f" alt=""><figcaption></figcaption></figure>

Use the following keys to mark the appropriate fields:<br>

* `FIELD_NAMES`\
  The actual name of the value/variable
* `FIELD_TYPES`\
  The type of the value. (vector3, float, integer, boolean etc.)
* `IGNORE`\
  Mark rows and cells you don't want to import with this key.<br>

### Default supported types

The CSV converter supports following types by default. If you have a special case you would have to override the ConvertFromCSV method -> see **Manual conversion**

* string
* int
* float
* double
* bool
* vector2
* vector3
* vector4
* quaternion
* rect
* List\<string>
* List\<int>
* List\<float>
* List\<bool>

### Manual conversion

You can override the ConvertFromCSV method in your custom DataObject class to read from the imported CSV string and convert custom data in any way you want.

### Formats

Make sure to separate values by comma. For example:

`Vector3` 0.3, 2.0, 4.0\
`Color` 255, 220, 120, 255\
`List<string>` A, B, C, D, E, F

## Google Spreadsheets

To import a Google spreadsheet select the import module in the Databrain editor. Make sure Google Import is selected.

<figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2FDUwEBMpL45A0RMGOxd17%2FimportModule.png?alt=media&amp;token=72af75ef-df5a-4149-b0df-5bc0b1972561" alt=""><figcaption></figcaption></figure>

In Databrain a Google Spreadsheet equals to a namespace in Databrain. Whereas a Google Worksheet equals to a data type.

1. Open a spreadsheet file in Google.
2. In the top right corner, click Share.
3. Click `Get shareable link` in the top right of the `Share with others` box.
4. To choose whether a person can view, comment, or edit the file, click the Down arrow next to `Anyone with the link.`
5. Select the namespace in the import module.
6. Copy the link and paste it in the Google Share Link field.

<figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2FK3mjH8lZPpTkrlUCxqKu%2FgoogleShareLink.png?alt=media&amp;token=ddc2e78d-7638-4dee-a4e7-8a41419fce8c" alt=""><figcaption></figcaption></figure>

### Add Worksheets

Each data type equals a worksheet. That's why we now have to set the worksheet ID for each data type.

1. Open a spreadsheet file in Google.
2. Select the correct worksheet and search for the gid number in the browser URL field. Select and copy it.

<figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2Fsuoqx6bxHwGpmiQpkODy%2Fgoogleworksheetid.png?alt=media&amp;token=9e467fac-e476-4842-91f9-cef1b59d93d2" alt=""><figcaption></figcaption></figure>

3. Enter the gid number in the appropriate worksheet id field.

<figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2FrY0aspcSxhb0KB4YfmsQ%2FgoogleWorksheets.png?alt=media&amp;token=d08fda27-f623-4ca0-8a7d-a5dcd13e15b7" alt=""><figcaption></figcaption></figure>

4. Select whether you want to append or replace the data objects.
5. Click on import.
