---
title: "Importing Attribute Values"
canonical: "https://docs.rubiconwater.com/space/CFGNC/2001012794/Importing%20Attribute%20Values"
format: markdown
---
> Macro (toc)

You can import a set of attribute values for an object, or a set of objects, from an external spreadsheet. This is particularly useful when:

- You have created a new attribute and you want to quickly set attribute values for multiple objects.
- You want to apply a calculated change to attribute values for multiple objects. For example, you want to increase all the attribute values by 20%.

# Importing Attribute Values from a File

To import attribute values from a file:

**Step 1**

In the Attribute Editor module on the **Import Attribute Values** tab, click **Import** to open the Import tool.

**Step 2**

Select the spreadsheet file that contains the attribute values. This must be a file in csv (comma separated values) format.

**Step 3**

Specify the **Object Type** for the import. If you are importing values for more than one object type, this must be the parent object for all the other types. 

> ℹ️ **Note**
> ℹ️ 
> ℹ️ You can also remove any rows with unmatched object types after you have imported the data. See  [Resolving Import Errors](https://rubiconwater.atlassian.net/wiki/spaces/CFGNC/pages/2001012794/Importing+Attribute+Values#Resolving-import-errors%3A).

Specify the spreadsheet column where the object names are held.

> ℹ️ **Example**
> ℹ️ 
> ℹ️ If the object names are listed in the first column, choose column A.

**Step 4**

Pick the **Attribute Type** from the drop-down list and specify the spreadsheet column where the attribute values are held.

> ℹ️ **Caution**
> ℹ️ 
> ℹ️ Check that you have specified the correct attribute type. The import tool does not read the attribute name from the file, so it is up to you to ensure that you import the correct attribute values.

> ℹ️ **Note**
> ℹ️ 
> ℹ️ Attribute types cannot be imported if they are not configured to be *Enterable*. If they are not enterable, they will not appear in the attribute type list.

**Step 5**

Specify the **Time and Date** when the attribute values will take effect. This defaults to the current time and date.

**Step 6**

If your spreadsheet includes a header row, select the **Contains Header Row** checkbox. Your spreadsheet must not contain more than one header row.

**Step 7**

Click **OK** to import your values.

## Resolving import errors:

The imported values are displayed on the tab. Any invalid values are highlighted in red, with a description of the error. You must resolve these errors before the changes can be saved.

> ℹ️ **Example**
> ℹ️ 
> ℹ️ If you import data for sites with a different object type from the one you specified for the import those rows will be flagged as errors.

> ℹ️ **Caution**
> ℹ️ 
> ℹ️ Check your imported values carefully. Object names do not necessarily have to be unique, so it is possible that the import tool will identify the wrong object.

To resolve import errors:

1. Display any errors at the top of the table by clicking on the **Invalid Reason** column header to sort by this column. Click the header again to sort in the other direction if necessary.
2. Select one or more rows with an error and choose one of the tools to the right of the table. Choose  **Modify** to make changes to the row, or **Remove** to remove the row.
3. If you make a mistake, click **Cancel** and reimport the attribute values.
4. When you have removed or corrected any errors, click **Save** to save your changes.

# File Format for importing attribute values

The import file must have the following properties:

- It must be in comma separated value (csv) format. (These files can be opened and edited in Microsoft Excel and in other spreadsheet applications).
- The object names must be in one column
- Only one column of attribute values can be imported at a time. Any other columns will be ignored.
- The file can have no more than one header row.
- If you have blank rows in your file, they will be imported as unknown objects. The import can proceed, but you will have to remove those rows before you can save the other imported values.
- You can import attribute values for more than one object type, but the primary object type must be the parent of all the other object types.

# Tips for creating an import file

You can create a suitable file by exporting an object attribute table that you have loaded in another tab of the Attribute Editor.

To export a table:

1. Load the objects and attributes that you want to export in the Attribute Value, Attribute History, or Multi-Value Editor tabs. If you choose, you can filter the objects by the value of an attribute. See <u>[Filtering objects by attribute values](https://rubiconwater.atlassian.net/wiki/spaces/CFGNC/pages/2002190505)</u> for details.
2. Right-click on the table and choose **Export table to Excel file**.
3. Specify a file name and location and click **Save** to save the file.

You can now edit your attribute values in the exported file and reimport the file on the **Attribute Editor > Import Attribute Values** tab.

# Example: Import Latitude and Longditude for Sites

Suppose you want to import a the latitudes and longditudes for a set of sites.

**Step 1**

Create a csv file that includes the following columns:

- Object name
- Latitude
- Longitude

You can only import one column of data at a time so in this example we will start by importing the *Latitude* data.

**Step 2**

Open the import tool and select the csv file with your location data.

**Step 3**

In the **Object Type** field specify the object type of the sites you are importing data for and in the **Object Name Column** field specify the column in the csv file where the site names are listed.

> ℹ️ **Note: **
> ℹ️ 
> ℹ️ If you select an object type then any sub-types will also be included. For example, if you select *Outlet* then *Unmetered Outlet* and *Metered Outlet* (and any other outlet types) will be imported.

**Step 3**

In the **Attribute Type** field choose *Latitude* for the attribute type of the import data and in the **Attribute Value Column** specify the column in the csv file where the data is located.

**Step 4**

Accept the default setting for time and date (which is the current time and date)

**Step 5**

Specify whether or not your data has a header row so the tool knows whether to try to import data from that row.

**Step 6**

Click **OK** to import the data. Once the data is loaded you can check for any errors before you complete the import process. See [Resolving Import Errors](https://rubiconwater.atlassian.net/wiki/spaces/CFGNC/pages/2001012794/Importing+Attribute+Values#Resolving-import-errors%3A).

> ℹ️ **Note: Object Types**
> ℹ️ 
> ℹ️ If you have object types in your csv file that don’t match the type (or belong to the parent type) you specified, the data for the unmatched types will be flagged as invalid and you will need to correct or remove it before completing the import. 
> ℹ️ 
> ℹ️ If you do have a mixture of object types in your data you can either separate the data into different files for each object type, or just import the original file again for each object type removing any invalid data from the import table each time you run the file.

**Step 7**

Now import the file again but this time select *Longitude* for the attribute type and specify the column where that data is listed.

---