--- title: "CreateTableFromWorkbook" slug: "createtablefromworkbook" updated: 2025-09-26T09:16:46Z published: 2025-09-26T09:16:46Z canonical: "docs.datajet.app/createtablefromworkbook" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # CreateTableFromWorkbook Imports data from an excel workbook into a table | Key | Value(s) | Description | | --- | --- | --- | | method | "CreateTableFromWorkbooks" | Imports data from an excel workbook into a table | | project | "ProjectName" | | | worksheet | "WorksheetName" | Name of worksheet to load. If provided, will load a specific worksheet name. If missing, will load the first sheet. | | table | "TableName" | Name of the table to create | | action | "LOAD"/"APPEND" | | | headerRow | 1 | Row that contains the field names for the columns to create | | startRow | 0 | First row of data to load. If 0, starts in row after header row. | | endRow | 0 | Last row of data to load. If 0, all data is loaded. | | ignoreEmptyRows | false | If true, empty rows will not be loaded. | | worksheetRowName | "" | If provided, stores the name of the worksheet that the record was loaded from. | | filenameColumn | "" | If provided, stores the workbook name that the record was loaded from. | | allStringTypes | false | If true, all data will be loaded as string | | leadingZeroAsStringType | false | If true, data with leading 0s (e.g., 0015242) will be loaded as string | | minDiscreteSize | 0 | Optional. Specify initial minimum discrete field size with key "minDiscreteSize": 1[2 or 4] | | path | "PathToFolder" | The Path to the folder containing the workbooks | | order | "CREATED" | | | trimTrailingSpaces | false | If true, trailing spaces will be stripped as part of the load. | | drop | true/false | Optional. Default = false. If false, and table exists, error will be raised. If true, drops "table" if it already exists. | | stringFields | [ "Fields1" "Field*" "*Field" "*Field*" "..." ] | Optional List of fields to import as string. Supports wild-card at the beginning and/or end of string. Added in v7.9.26.1 | #### example ```json { "method": "CreateTableFromWorkbook", "action": "LOAD", "table": "ssd", "filename": "%DATAPATH%/details_precint.xlsx", "worksheet": "Sheet", "headerRow": 1, "startRow": 0, "endRow": 0, "worksheetRowName": "", "ignoreEmptyRows": true, "allStringTypes": false, "leadingZeroAsStringType": false } ``` ## #### JSON right-click: ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1730736153685.png) #### Excel Loader Accessed through **Script Editor | Import Data | Excel File,** the Excel Loader loads a new table from a worksheet in an Excel workbook. ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1648748563583.png) To load an excel file: 1. Browse for the **workbook** via the **file** icon (once selected a list of available worksheets will fill the combo box) 2. Select the required **worksheet** and specify **table name.** 3. Optionally set the header start row and start and end rows to load. The default value for start and end rows is 0, this will load all available rows. **Tip:** If the workbook is not already on the server, upload it with the [Remote File manager](/v1/docs/remote-file-manager) (**Admin | Remote Files**) ```json { "method": "CreateTableFromWorkbook", "action": "LOAD", "table": "mytable", "filename": "%DATAPATH%/a.xlsx", "worksheet": "Index", "headerRow": 1, "startRow": 0, "endRow": 0, "ignoreEmptyRows": true } ``` ```json { "method": "CreateTableFromWorkbook", "action": "LOAD", "table": "LondonStations_WIKI", "filename": "%DATAPATH%BikeData/BikeOverview/LondonStations.xlsx", "worksheet": "Sheet1", "headerRow": 1, "startRow": 0, "endRow": 0, "worksheetRowName": "", "ignoreEmptyRows": true, "allStringTypes": false, "leadingZeroAsStringType": false, "project": "BikeData2" } ``` ## Related - [CreateTableFromWorkbooks](/createtablefromworkbooks.md)