Skip to main content
Skip table of contents

ImportExcelInGrid: import data from a Excel or CSV file

Tag: ImportExcelInGrid

The ImportExcelInGrid action uses a file as input to insert its content in a grid.

Detailed Description

When an Excel/CSV file and a grid can be matched through key columns, eg. an email column in the file and an email column in the grid, each column of the file can be inserted as a column in the grid.

These columns are volatile and disappear when the module containing the grid is closed..

Once inserted, the new grid columns may be processed like any other column (sorting, grouping, export…).

Tag Attributes

Attribute

Description

Target

The corresponding Grid Code

Sets the target grid panel. Not Required

If no target is set, the default main grid target will be used.

ImportKey

Name of the column from the file to use as the key that connects the data in the file with the data in the grid. Required

GridKeyUID

Unique ID of the column from the grid as shown in the Grid Manager to use as the key that connects the data in the file with the data in the grid. Required

FilePath

Full or relative (to the current automation script) path of the file to import. Required

Separator

If a cell value represents a list and this list is to be inserted as a multi-value field in the grid, this parameter is used to separate each element in the list. Not Required

The selection of the file columns to import is made through one or several SetParam actions set as children of the ImportExcelInGrid action.

SetParam Tag Attributes

Attribute

Description

Value

File Column name. Required

ColumnID

Unique ID for the grid column that will contain the imported data of the file column set in Value. Required.

This UID is then automatically prefixed with the text: _IMPORTED_

ColumnTitle

Title of the imported grid column. Not Required

If not set, the title from the file is used.

Example Script

XML
<ytriaAutomation>
	
    <ShowUsers>
		<Select lines='all'/>
		<ImportExcelInGrid ImportKey='Name' GridKeyUID='userPrincipalName' Filepath='D:\dev\Temp_XML\USERPROJECTS.xlsx'>
            <SetParam Value='Project' ColumnID='ProjectXL'/>
            <SetParam Value='Score' ColumnID='ScoreXL'/>
		</ImportExcelInGrid>
    </ShowUsers>
		
</ytriaAutomation>

This script matches the grid column with UID userPrincipalName to the file column titled Name and imports the two columns Project with original title and UID _IMPORTED_ProjectXL, and Score with original title and UID _IMPORTED_ScoreXL.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.