datatable, data, import, excel, xls, xlsx, load, scriptless, script-less, scripted, step, view, stepview

Method Datatable.ImportExcel

Imports values to the datatable from external Excel file

Watch this video to learn how to use this method

Have a problem with playback?

Usage

Function DataTable.ImportExcel( 
    String Path,
    String SheetName [Optional],
    Boolean OverwriteTable [Optional],
    Boolean AddPrefixToColumnName [Optional]
)

ZAP Utility

Zap.Da...ImportExcel

C:\datatable.xls

sheet1

true

false

Path

SheetName

Boolean OverwriteTable

Boolean AddPrefixToColumnName

Parameters

Path

Type: String

Path of the Excel file

SheetName (optional)

Type: String

Default value: Empty String

Sheet name to import

OverwriteTable (optional)

Type: Boolean

Default value: true

If set to true, overwrites the existing datatable values

AddPrefixToColumnName (optional)

Type: String

Default value: false

Adds the filename prefix to the parameter name (Especially useful to prevent duplicate parameter names when OverwriteTable is set to false)

Returns

No return value

Example

VBScript

Datatable.ImportExcel "C:\datatable.xls", "Sheet1", true, false

JavaScript

Datatable.ImportExcel("C:\\datatable.xls", "Sheet1", true, false);

Comment

Import datatable values from Excel file

ZAP Utility

Zap.Da...ImportExcel

C:\datatable.xls

Comment

Set sheet name, overwrite datatable values and add prefix to column name

ZAP Utility

Zap.Da...ImportExcel

C:\datatable.xls

sheet1

true

true

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227