多维表格
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.8 KiB

---
title: 'Create table via import'
description: 'Learn how to create a table in NocoDB via import from CSV, Excel or JSON.'
tags: ['tables', 'import']
keywords: ['NocoDB table', 'create table', 'table administration', 'table organization', 'import table', 'import csv', 'import excel', 'import json']
---
## Import table from CSV / Excel / JSON
### Accessing import modal
There are two ways to access import modal:
#### 1. From the base dashboard
![image](/img/v2/table/table-import-1.png)
![image](/img/v2/table/table-import-2.png)
#### 2. From the base context menu
![image](/img/v2/base/base-import-sub-menu.png)
### Importing file
There are two ways to upload source file:
#### 1. Upload from local directory
1. Select `Upload` tab from the Quick import modal.
2. Click on `file upload` button or drag and drop file to the modal.
3. [Advance Settings](#advance-settings) (optional)
4. Click on `Import` button.
![image](/img/v2/table/import-csv.png)
#### 2. Upload from URL
1. Select `URL` tab from the Quick import modal.
2. Paste the URL of the file.
3. [Advance Settings](#advance-settings) (optional)
4. Click on `Import` button.
![image](/img/v2/table/import-csv-url.png)
:::info
- Multiple files can be imported at once.
- Supported file formats: CSV, Excel, JSON
- Maximum file size: 5 MB
:::
### Import configurations
1. [**Optional**] `Table name` - defaults to the name of the file; double click to edit.
2. [**Optional**] `Field configurations`
- `Field name` - name of the column as identified from import file header; click to edit.
- `Field type` - inferred from the data in the column; click to edit.
- `Options` - For `Single select` and `Multi select` field types, options identified are listed here; click to edit.
3. [**Optional**] `Remove field` - Click on delete icon to exclude a field in source file from being imported.
4. Click on `Import` button to start importing the file.
![image](/img/v2/table/import-stage-2.png)
### Advanced Settings
- **Number of Rows for Datatype Inference**: Default value is set to 500 rows.
- **Automatic Field Type Detection**: Enabled by default. If selected, the system will automatically detect field types. Otherwise, all fields will default to "SingleLineText."
- **Utilize First Row as Headers**: Enabled by default. If selected, the first row will be treated as the header row and used as field names.
- **Import Data**: Enabled by default. If selected, all data will be imported; otherwise, only the table will be created.
:::info
By default, the first column will be chosen as Display Value and cannot be deleted.
:::
## Related articles
- [Table overview](/tables/table-overview)
- [Create table](/tables/create-table)
- [Import data from Csv/Xlsx into existing table](/tables/import-data-into-existing-table)
- [Delete table](/tables/delete-table)
- [Table actions](/tables/actions-on-table)