Monday, December 27, 2021

Refresh imported data

When you view a Visio diagram on your desktop or on the web, you can refresh data in it to see any updates that were made to the linked data source.

With Office Visio, you can refresh the data that is imported into a Visio diagram by using the Custom Import, Quick Import, and Create from Data features. You can also resolve data conflicts, which 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.

  3. If you get a Microsoft Visio Security Notice message and you trust the data source, then select OK.

  4. 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.

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.

How 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

For more information, see Data Selector Wizard (Configure Refresh Unique Identifier).

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 pane appears. The pane 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 pane opens automatically, as illustrated in the following example.

Refresh conflicts window listing shapes that no longer have a corresponding row in the data source.

  1. In the Refresh Conflicts pane, 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 pane opens automatically, as illustrated in the following example.

Refresh conflicts window listing shapes that cannot be linked because of a problem with the unique identifier.

  1. In the Refresh Conflicts pane, 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

When you view a diagram in Visio for the web, you can refresh data in it to see any updates that were made to the linked data source. With the ability to refresh data, your diagram is like a live dashboard to which you and your team can continually refer.

Conceptual image showing the link between a Visio file and its data source.

Create a data connection

  1. Before you begin:

    • Choose a data source, either an Excel workbook uploaded to SharePoint Online or a SharePoint list.

    • Save the URL of the data source.

  2. Open the diagram in Visio 2013 or later and link the shapes to the data source using the URL saved in step 1. For more information, see Import data to shapes in your drawing.

  3. Once you have successfully linked the data source, upload your diagram to SharePoint Online. Make sure that the data source and diagram are stored in the same SharePoint site. For more information on uploading, see Upload files and folders to a document library.

  4. Share the link of the uploaded diagram with your colleagues who can now see the most up-to-date data in the dashboard. For more information on sharing, see Work together on Visio drawings.

Refresh the data in your diagram

  1. Open your diagram for viewing. For more information, see View, create, and edit a diagram in Visio for the web.

    You should see the following Refresh disabled alert message:

    Refresh disabled alert message in Visio for the web Public Preview.
  2. To enable refreshing, select Allow Refresh.

  3. To see more information about the data connection, select Details.

  4. Select Refresh Data to refresh all data sources in the diagram.

    Visio for the web Public Preview Refresh Data option

    If the Refresh Data command is unavailable (appears greyed out or dimmed) there are no data connections that have linked shapes on the current page and other pages, or the diagram is a Data Visualizer diagram.

When a data conflict happens

Conflicts may arise if you make a change to the data source, such as deleting linked rows or creating a new row with the same unique identifier as another row. In both cases, when you are viewing a diagram, the Refresh Data command cannot refresh the data in all of the shapes because it can no longer match each shape to a row. If such conflicts occur, the Refresh Conflicts window appears. If you see this alert, open the file in Visio and correct the problem.

Refreshing a Data Visualizer diagram

When you are viewing a Data Visualizer diagram, you can't refresh the diagram using the Refresh command. To see the latest Excel data in the diagram, open the diagram in Visio 2016 or later, select the diagram container, and then select Data > Refresh.

See Also

Automatically link imported data to shapes

Data Selector Wizard (Configure Refresh Unique Identifier)

No comments:

Post a Comment