Refresh imported data

With Microsoft Office Visio 2007, you can refresh the data that is imported into a Visio diagram by using the Data Link features, and you can resolve data conflicts. Data conflicts are usually caused by rows that were added or deleted in the data source after your diagram was created. You can also schedule the data refresh to occur at fixed intervals.

 Note   You cannot update the data source to which a Visio diagram is linked by making changes in the Visio diagram.

What do you want to do?


Refresh the data in a drawing

  1. Open the drawing that contains the data that you want to refresh.
  2. On the Data menu, click Refresh Data.

Refresh Data is unavailable (appears dimmed) in the following cases:

  • You did not use the Data Link features to import your data.
  • You are working on a PivotDiagram. To refresh the data in a PivotDiagram, on the PivotDiagram menu, click Refresh Data.
  1. In the Refresh Data dialog box, do one of the following:
    • To refresh a single data source, select it in the Data Source list, and then click Refresh.
    • To refresh multiple data sources, hold down CTRL while you select the data sources in the Data Source list, and then click Refresh.
    • To refresh all data sources, click Refresh All.

 Tip   To choose the order in which the data sources are refreshed, click the Data Source column heading.

Top of Page Top of Page

Set Visio to automatically refresh the data in a drawing

  1. Open the drawing that contains the data that you want to refresh.
  2. On the Data menu, click Refresh Data.
  3. In the Refresh Data dialog box, select one or more data sources.
  4. Select the Show this dialog box on file open check box.
  5. Click Configure.
  6. In the Configure Refresh dialog box, under Automatic Refresh, select the Refresh every check box, and then click the arrows to choose an interval.

 Important   For the refresh to work correctly, make sure you select the correct unique identifier.

ShowHow do I choose the correct unique identifier?

You need to choose a unique identifier for each table in order to refresh your drawing when the data in your data source changes. A unique identifier (or key column) should be a column that won't change. That key allows each row in the refreshed data to be accurately matched to a row in the data source that you are updating from.

In the following example of a Microsoft Office Excel worksheet, the unique identifier, or key, is the Employee ID column.

Excel table with data about employees

Top of Page Top of Page

Resolve conflicts between old and new data

You may need to resolve any conflicts between the new data from your data source and the old data in your drawing. For example, conflicts may arise if you delete a row from your data or create a new row with the same unique identifier as another row in the data source. In both cases, the Refresh Data command cannot refresh the data in all of the shapes, because it can no longer match each shape to a row in the refreshed data source. If such conflicts occur, the Refresh Conflicts window appears. The window provides options that help you to resolve the conflicts.

Resolve conflicts caused by deleted rows of data

If you refresh a diagram after a row has been removed from your data source, either you can choose to remove the shape it is linked to  — so your diagram continues to match the data  — or you can keep the shape even if the data source no longer has a row linked to that shape.

If there are conflicts after you refresh data, the Refresh Conflicts window opens automatically, as illustrated in the following example.

Refresh conflicts window listing shape that cannot be linked

  1. In the Refresh Conflicts window, in the list of shapes, select the shapes that you want to apply one of the following commands to.
  2. Click one of the following:
    • Delete Shape to delete only the selected shapes
    • Delete All Listed Shapes to delete all of the shapes with missing rows
    • Keep Shape to keep only the selected shapes
    • Keep All Listed Shapes to keep all of the shapes with missing rows

 Note   The Delete Shape and Keep Shape commands are unavailable (appear dimmed) if no shape is selected in the list.

Resolve conflicts caused by data that can't be uniquely identified

If your data doesn't have a unique identifier, or if the unique identifier changes in the data source before you refresh the drawing, the Refresh Data command may not be able to match the correct row with its corresponding shape.

If there are conflicts after you refresh data, the Refresh Conflicts window opens automatically, as illustrated in the following example.

Refresh conflicts window with shape without corresponding row in data source

  1. In the Refresh Conflicts window, in the list of shapes, select the shapes that you want to apply one of the following commands to.
  2. Click one of the following:
    • Select Matching Row to open the Select Matching Row dialog box, where you can determine which row should be associated with the shape in question.
    • Ignore All Conflicts to keep the duplicate rows in the External Data window. Existing links to these rows are deleted.

 Note   If you click Ignore All Conflicts, the rows with duplicate unique identifiers remain in the window, the original data is still stored in the Shape Data dialog box, and no links exist between the shape and the data.

Top of Page Top of Page

 
 
Applies to:
Visio 2007