# ExcelImportPlugin

The **ExcelImportPlugin** is used to sideload additional attribute data not included in the initial source files. This feature helps to implement data from sources other than the original authoring systems and can contain any information, e.g. from third-party-sources or databases.

## Software and licensing requirements

> The **ExcelImportPlugin** requires an active API/SDK licence for the UniversalPlantViewer Builder.

## Setup Procedure

The **ExcelImportPlugin** is not an executable plugin and comes without a setup routine. After the file download, unpack the content of the container (.zip) to **one** of the directories listed.

For current user use only:

%AppData%\\CAXperts\\Universal Plant Viewer Builder\\Plugins\\

For all users (administrator rights might be required):

%programfiles%\\CAXperts\\Universal Plant Viewer Builder\\Plugins\\

## Usage

## Attribute and Value Definition

The Attributes are defined in an Excel file following a fixed syntax:

<img src="./media/ExcelImportPlugin_image6.png" width="572" height="100">

**Source Attribute (UPVC)** -- The Source Attribute to look for when adding a new attribute.

**Source Value (UPVC)** -- Specifies a condition for the Source Attribute value.

**New Attribute** -- The new attribute you wish to define.

**New Value** -- The value to be stored under the new attribute.

By choosing a Source Attribute that applies to multiple objects, the new attribute is added to all objects containing that attribute with the defined Source Value.

For importing attributes to IntelliPID the sheet in the Excel file needs to be named "IntelliPID_Import", for 3D the sheet should be called "Import".

## File Name and Placement

Multiple Excel files are supported. The ExcelImportPlugin will consume all Excel files within the "ExcelImport" folder next to the selected UPVC/UPVM file.

> This folder must be placed in the directory containing your .upvc files.

If this is the case, the files in the folder will automatically be considered once the plugin is activated in the UniversalPlantViewer Builder (See chapter *[Activating the ExcelImportPlugin]{.ul}*).

If the folder is not present, the file defined in the configuration file will be used (see chapter *[Configuration file]{.ul}*). If that file is not found, either, the plugin will be ignored in the building process.

## Activating the ExcelImportPlugin

To import the additional attributes and values, the ExcelImport Plugin must be activated first. Go to **Tools → Settings** in the menu bar and select the **Plugins** tab. Select the "UPVPluginExcelImport" plugin from available plugins (fig. 2-1), transfer it to the used plugins by clicking on the **\[\>\]** button (fig. 2-2) and confirm your selection with **\[OK\]** (fig. 2-3).

<img src=".\media/ExcelImportPlugin_image7.png" width="778" height="370">

## Configuration File

The plugin is configurable through a configuration file named UPVPluginExcelImport.xml. This file is located alongside the .dll of the plugin (see chapter "Setup procedure"). It contains three values that can be set for configuration (fig. 3).

<img src=".\media/ExcelImportPlugin_image8.png" width="558" height="119">

**Connection String** -- If no ExcelImport.xlsx file is contained in the .upvc-files folder of the project, the file from the connection string is used. If this file does not exist, the plugin is ignored.

**SheetName** -- Specifies the sheet to be used for import from ExcelImport.xlsx (Default: **Import**).

**Debug** -- Activated the debugging mode with detailed information on the building process.
**0** for deactivated, **1** for activated (Default: **0**).
