# Excel Connector

## Overview

This flow can be used to Migrate data into IFS Cloud as an example of how to Read and Write data to Microsoft Office 365 Excel documents.&#x20;

<figure><img src="https://3218748546-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiW42YxFsGXIDjQJKNR%2Fuploads%2FAiYnSWwp8b0tZ8DKAD1J%2FMigration%20From%20Excel.png?alt=media&#x26;token=436a13a4-69fd-44db-9cfc-5132dae00bf2" alt=""><figcaption></figcaption></figure>

You can use the content of this component as an example or template to create your own Apps with embedded Excel functionality.

Within this example, you can migrate data from an Excel document into projections inside IFS Cloud. The projections used in this example are: Create Customer, Create Supplier, Create Work Order, and Create Part.

{% hint style="info" %}
Download the Excel migration demo file below.
{% endhint %}

{% file src="<https://3218748546-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiW42YxFsGXIDjQJKNR%2Fuploads%2F23IhoJqmPYDl9DOPsuGF%2FExcel%20Data%20Migration%20Example.xlsx?alt=media&token=524e00cc-6820-4d91-bfe1-954c89256b2f>" %}

## **Launching the app**

### **Login**

You will be prompted to log in to Microsoft Graph using OAuth to access your Excel documents.

* Log in using your Microsoft Active Directory credentials
* Once successfully select Continue to sign in to Microsoft Graph

### Select IFS method

<figure><img src="https://3218748546-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiW42YxFsGXIDjQJKNR%2Fuploads%2FqlhS6XdWQ24WqAX74ve8%2Fmethod.png?alt=media&#x26;token=bfdaeacc-1a8b-4d2d-80cb-e563c92baa10" alt=""><figcaption></figcaption></figure>

This screen allows to to choose the destination for the data migration. The options here are limited for this example, but you can add your own methods as required.

### Select Excel document

<figure><img src="https://3218748546-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiW42YxFsGXIDjQJKNR%2Fuploads%2FnPmOck753XNOXFJwhcao%2Fselect.png?alt=media&#x26;token=fd43c458-a397-4221-b102-bb8e67cfa194" alt=""><figcaption></figcaption></figure>

You can enter an Excel file path (Office Cloud) or select from your recently used files.&#x20;

### Select data within the Excel document

<figure><img src="https://3218748546-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiW42YxFsGXIDjQJKNR%2Fuploads%2FX89HTL2gqHew5zbylYrl%2FSelect%20Data%20set.png?alt=media&#x26;token=109366da-322a-4179-a977-7906d2126db2" alt=""><figcaption></figcaption></figure>

Select the data within the Excel document, Available choices are Excel worksheets and named Tables.

Worksheets show as green, and any named tables will show as Yellow with the table identifier under each associated worksheet.

{% hint style="info" %}
Selecting a worksheet will set the data range to the worksheet used range. using a table will limit the data range to the table's defined range.
{% endhint %}

### Colum Mapping

<figure><img src="https://3218748546-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiW42YxFsGXIDjQJKNR%2Fuploads%2Fs4pCtO42EA4EAWPSz2Ld%2Fcolumn%20mapping.png?alt=media&#x26;token=e7078388-aed5-46ee-808d-a63a92b72df9" alt=""><figcaption></figcaption></figure>

The App will automatically assign any Excel columns to the IFS object name if they match.&#x20;

The Colored Yellow rows (sorted to the top in alphabetical order) are required IFS fields. You can map columns or set default values (dropdown list) or strings. The same applies to Optional IFS objects. Records will turn Green when a value is chosen.&#x20;

{% hint style="info" %}
IFS  fields like CreationDate can be left empty as these are populated by the IFS system automatically.
{% endhint %}

### Review

<figure><img src="https://3218748546-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiW42YxFsGXIDjQJKNR%2Fuploads%2Fe6RfjANLB6jmfDDc1gig%2Fconfirmed.png?alt=media&#x26;token=7796ce27-92a1-4ec8-b983-8b5a4e75a9c1" alt=""><figcaption></figcaption></figure>

You can review the created IFS objects on this screen, and end the workflow here, or continue to write a summary of the created IFS objects back to the same document as a new sheet.&#x20;

### Write to Excel&#x20;

<figure><img src="https://3218748546-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiW42YxFsGXIDjQJKNR%2Fuploads%2FfEZ1XGmwi6m7PB9UETo5%2Fimage.png?alt=media&#x26;token=904901ff-fb6d-40ab-ae16-01ada2ba2b7f" alt=""><figcaption></figcaption></figure>

Select any IFS columns to **exclude** from the export.

### Enter Worksheet name

<figure><img src="https://3218748546-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiW42YxFsGXIDjQJKNR%2Fuploads%2Fk3NQ6mQrMDz8VrgCsBIW%2Fsheetname.png?alt=media&#x26;token=70a92564-9c05-49a9-84b2-87f2ff45de58" alt=""><figcaption></figcaption></figure>

By default, the IFS projection name and current date/time are used.

When you create the summary a new worksheet will be created with data representing the newly created objects within IFS.
