After a workbook is created, you can write data to the workbook for data analysis. You can also import data from a data store or import local data to the workbook. This topic describes how to import data to a workbook.
Prerequisites
Limits
The Query mode feature supports the following data store types and regions:
- Supported data store types: MaxCompute, MySQL, PostgreSQL, DRDS, SQL Server, Oracle, AnalyticDB for MySQL V2.0, AnalyticDB for PostgreSQL, Hologres, EMR Hive, and EMR Spark SQL.
- Supported regions: China (Shanghai), China (Beijing), China (Hangzhou), China (Shenzhen), China (Chengdu), China (Hong Kong), China (Zhangjiakou), China North 2 Ali Gov, Singapore, Indonesia (Jakarta), and Japan (Tokyo).
Go to the workbook editing page
Import data from a data store
You can use the Query mode feature to import data from a data store to a workbook for data analysis.
Import local data
On the workbook editing page, move the pointer over Import in the upper-right corner and select Local File or File Data to import local data.
- If you select Local File, you can import only Excel files from an on-premises machine. Data in all sheets
of a selected Excel file is imported.
Move the pointer over Local File. Select an Excel file and click Open to import data in all sheets of the Excel file to the workbook.
and select - If you select File Data, you can import data from workbooks or import CSV files or Excel files from an on-premises
machine. If you import data from a workbook or an Excel file, you can specify the
sheet from which the data is to be imported.
Move the pointer over File Data. In the Import dialog box, select one of the following types of source data based on your needs:and select
- SpreadsheetIn the Import dialog box, click Spreadsheet, set the parameters, and then click OK.
Parameter Description Spreadsheet The workbook from which the data is to be imported. Select a workbook from the Spreadsheet drop-down list. Sheet The sheet from which the data is to be imported. Select a sheet from the Sheet drop-down list. Data Preview A section that displays the data in the selected sheet. Import Start Row The row from which the data is to be imported. Default value: 1. Placement Location The location where the imported data is placed. Valid values: Current Worksheet and New Worksheet. Placement Method The way in which the imported data is placed. Valid values: Append, Overwrite, and Active Cell. - Local CSV FileIn the Import dialog box, click Local CSV File, set the parameters, and then click OK.
Parameter Description File The CSV file from which the data is to be imported. Click Select File(.csv), select a CSV file from the on-premises machine, and then click Open. Original Character Set The character set that is used by the selected CSV file. Valid values: UTF-8 and GBK. If garbled characters appear, you can change the character set. Separator The row delimiter and column delimiter. - Valid values of row delimiters: \r\n, \n, and \r.
- Valid values of column delimiters: ,, ;, and \t.
If the cell data cannot be correctly divided, you can change the delimiters.
Data Preview A section that displays the data in the selected CSV file. Import Start Row The row from which the data is to be imported. Default value: 1. Placement Location The location where the imported data is placed. Valid values: Current Worksheet and New Worksheet. Placement Method The way in which the imported data is placed. Valid values: Append, Overwrite, and Active Cell. - Local Excel FileIn the Import dialog box, click Local Excel File, set the parameters, and then click OK.
Parameter Description File The Excel file from which the data is to be imported. Click Select File(.xlsx), select an Excel file from the on-premises machine, and then click Open. Sheet The sheet from which the data is to be imported. Select a sheet from the Sheet drop-down list. Data Preview A section that displays the data in the selected sheet. Import Start Row The row from which the data is to be imported. Default value: 1. Placement Location The location where the imported data is placed. Valid values: Current Worksheet and New Worksheet. Placement Method The way in which the imported data is placed. Valid values: Append, Overwrite, and Active Cell.
- Spreadsheet