Complete contract structures are usually delivered by the supplier as an Excel workbook. The **Import from Excel** function reads such a workbook and creates the contracts, their sub-levels and all contract items in one step.

!!!WARNING
The import **replaces the complete contract data**. All existing contracts and contract items are deleted before the workbook is read. Use the function to set up or renew the contract database, not to add single entries.
!!!

The function requires both the "Edit Contract" and the "Edit Contract Item" access right, see [Access Rights](/Technical/Stock-Control/Contracts/Access-Rights.md).

## Structure of the workbook

The workbook contains three sheets which describe the three levels of the contract structure:

| Sheet | Meaning |
|---|---|
| `Catalogs` | The main contracts |
| `SubGroups` | The sub-contracts, each assigned to a main contract |
| `Items` | The contract items, each assigned to a sub-contract |

### Sheet "Catalogs" - main contracts

| Column | Imported as |
|---|---|
| `CatalogID` | Reference used by the other sheets |
| `CatalogName` | Name of the contract |
| `Vendor` | Vendor |
| `ContractYears` | Duration in years |
| `CatalogDescription` | Description |

### Sheet "SubGroups" - sub-contracts

| Column | Imported as |
|---|---|
| `SubGroupID` | Reference used by the Items sheet |
| `CatalogID` | The main contract this sub-contract belongs to |
| `SubGroupName` | Name of the sub-contract |
| `SubGroupDescription` | Description |

### Sheet "Items" - contract items

| Column | Imported as |
|---|---|
| `SubGroupID` | The sub-contract the item belongs to |
| `ItemType` | Item type (`Part`, `Service` or `Transport`) |
| `DescriptionHR` | Name of the item |
| `ItemNo` | Item number |
| `PartNumber` | Makers reference |
| `DrawingNumber` | Drawing number |
| `ItemID` | Internal number |
| `Unit` | Unit |
| `Quantity` | Quantity |
| `UnitPrice` | Agreed unit price |
| `BrandName` | Type |
| `Group` | Creates an additional level, see below |
| `ParentItemID` | Title of the main contract |
| `opp ugovora` | Number of the main contract |

## Groups as an additional level

If the `Group` column of an item contains a value, the import creates a further level below the sub-contract with that group name and assigns the item to it. This keeps the equipment groups of the supplier's price list visible in the contract tree. Items without a group entry are assigned directly to their sub-contract.

## After the import

The contract tree is rebuilt automatically and the number of imported items is reported. Contract titles and numbers are taken from the item rows, so every main contract shows its official title and contract number afterwards.

*[PO]: Purchase Order  
*[AZA]: local folder
*[(PO]: Purchase Order  
*[RQ]: Requisition  
*[(RQ]: Requisition  
*[RfQ]: Request for Quotation  
*[(RfQ]: Request for Quotation  
*[SO]: Service Order  
*[(SO]: Service Order  
*[SQ]: Service Requisition  
*[(SQ]: Service Requisition  
*[SRfQ]: Service Request for Quotation  
*[OoB]: Open on Board  
*[(OoB]: Open on Board 
*[ART]: Average Running Time (operation hours per day) 
*[MC]: Master Contract
*[ADS]: Advantage Database Server (database engine used in previous versions of the ZeeBORN software)
*[.replic]: file extension for replication files (aka data transfer files)
