Importing Excel Data

A Microsoft Excel spreadsheet can be used to make changes to objects in an AFT xStream model. The values in the Excel file are located in specific locations as described in the Setting Up Excel section.

Setting Up Excel

When reading an Excel file, AFT xStream will search for a worksheet named AFT Transfer. There can be other worksheets in the workbook but xStream will only look for a sheet with this name. The file structure looks like the following:

Figure 1: Sample AFT Transfer Excel Sheet

Row 1 and column A are not read by AFT xStream - these cells can have any value in them, though it is recommended to enter the values above for the header row.

Each column has certain accepted values, which can depend on the values in neighboring columns.

Note: A template spreadsheet containing validation rules for the required layout is included in the AFT xStream installation. By default the file path is: C:\AFT Products\AFT xStream\AFT xStream Excel Import Workbook.xlsx

Apply Column

This column accepts Yes or No. Only changes marked as Yes will be imported into the model.

Object Type

This column must be a junction name or Pipe. Valid choices can be seen below in Table 1.

Object Number

This corresponds to the junction or pipe number.

Parameter

The specific parameter to be changed. These parameters vary based on the Object Name selected. Each parameter has a type (C/S/I) associated with it, as is explained in the next section.

Table 1: Object Types, Associated Parameters, and Change Codes

Change Code

Each Parameter has restrictions on how it can be changed. All of the Parameters are decimal numbers, integers, or strings.

Table 2: Valid Change Codes for each type of Parameter

Value

The actual value to change the Parameter to or by.

For special conditions there are specific values assigned to each special condition option, as are listed in the table below.

Table 3: Values used to import special conditions

Scenario Path Name

The Scenario that the changes are intended to apply to. If no scenario is present, the changes will be applied to the current scenario.

It is important that the Scenario name is uniquely qualified - if there are multiple scenarios with the same name, the full Scenario Path Name can be used. Scenario Path Names can easily be copied from AFT xStream by right-clicking the scenario name and selecting "Copy Scenario Path Name."

Importing the File

When the sheet has been completely filled out, it can be imported from File -> Import Excel Change Data. When importing the data, the Object Change Log will appear, listing the changes that were made and any errors that occurred during the import.

Table 4: Excel Importing Error Messages

Note: In order for the junction to accept the changes, some fields must already contain data. For example, if the control setpoint for a control valve is being changed, there must already be a setpoint and units entered into the control valve junction object. This is to ensure that the correct set of units are being used. These values can be set using Global Edit to an arbitrary value before the changes are made from Excel.

Related Blogs

Now it’s Super Easy! Changing Input Data in AFT Models using Excel Change Data

That was EASY! Quickly Change Pipe and Junction Input Data into AFT models using Excel Change Data