多维表格
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.

76 lines
3.0 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', 'CSV', 'Excel', 'JSON']
keywords: ['NocoDB table', 'create table', '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
![import data](/img/v2/base/base-import-from-dashboard-1.png)
![import from dashboard](/img/v2/table/table-import-from-dashboard.png)
#### 2. From the base context menu
![import from sidebar](/img/v2/table/table-import-from-sidebar.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. `Table name` - defaults to the name of the file; double click to edit (Optional).
2. `Field configurations` (Optional)
- `Field name` - name of the field as identified from import file header; click to edit.
- `Field type` - inferred from the data in the field; click to edit.
- `Options` - For `Single select` and `Multi select` field types, options identified are listed here; click to edit.
3. `Remove field` - Click on delete icon to exclude a field in source file from being imported (Optional)
4. Click on `Import` button to start importing the file.
![image](/img/v2/table/import-stage-2.png)
### Advanced Settings
- **Number of Records for Datatype Inference**: Default value is set to 500 records.
- **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 Records as Headers**: Enabled by default. If selected, the first record in the spreadsheet will be treated as the header record and its contents will be 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 field will be chosen as Display Value and cannot be deleted.
:::
## Related articles
- [Create a new table](/tables/create-table)
- [Import data from Csv/Xlsx into existing table](/tables/import-data-into-existing-table)
- [Rename a table](/tables/actions-on-table#rename-table)
- [Duplicate a table](/tables/actions-on-table#duplicate-table)
- [Delete a table](/tables/actions-on-table#delete-table)