In the preceding section, you saved a diagram to Visio
Services, applied a data graphic, saved the changes, and then refreshed
the web view of the drawing.
In this exercise, you will make more extensive changes to the diagram, including linking
it to an Excel workbook, changing the data in the workbook, and then
observing how those changes ripple through the diagram and the web
rendering.
Important
In order for Visio Services to have access to data in an Excel
workbook, the workbook must be stored in SharePoint prior to linking to
it from your Visio drawing.
-
On the Data tab, in the External Data group, click Link Data to Shapes.
-
On the first page of the Data Selector Wizard, click Microsoft Excel workbook, click Next, click the Browse button, and then navigate to, and open, the copy of the Excel workbook that you saved to SharePoint.
Tip
When you click the Browse button in the wizard and the Open dialog
box appears, it may be easier to navigate to your Excel workbook first
in your web browser. After locating the correct document, simply copy
and paste its URL into the address bar in the Open dialog box.
-
On the third page of the Data Selector Wizard
, select the worksheet named Status Data$, and then click Next.
-
Accept the recommendation to use Step Number as the unique identifier in the status data, click Next, and then click Finish. The External Data window opens. -
On the Data tab, in the External Data group, click Automatically Link, and then click Next on the first page of the Automatic Link Wizard
.
-
Select Step Number from the drop-down list under both Data Column and Shape Field, click Next, and then click Finish. You have linked data from your Excel workbook to the shapes on the Main Process
page of your diagram. Notice that the fill colors of some shapes have
changed because the status values in the linked data are different.
Important
The automatic linking
function in Visio works on one page at a time. You can confirm this by
viewing the left end of the External Data window: a link symbol appears
for steps 101–105 but not for the steps in the 200 range that are on
the other page. You will link the 200-series steps to shapes on the
Print and Fulfill page later in this exercise.
-
On the Quick Access Toolbar, click Save
, then switch to your web browser and click the Refresh button in the upper-left corner of the Visio diagram (do not click the browser’s refresh button). The color changes now appear in the web rendering.
-
In the upper-right corner of the Visio diagram, click Main Process, and then click Print and Fulfill to view that page.
Tip
Because the Fulfill Ticket Order shape contains a hyperlink to page
2, you can also point to that shape and then press Ctrl+click to move
to the second page.
-
Switch to Visio, click the page name tab for Print and Fulfill, and then apply the Color by Status data graphic to all shapes on this page. -
On the Data tab, in the External Data group, click Automatically Link, and complete the Automatic Link Wizard
for this page just
as you did in steps 5 and 6 earlier in this exercise. The shapes on
this page are now linked to Excel data on SharePoint as you will
demonstrate in the remaining steps of this exercise. -
Switch to Excel. Use the drop-down list in the Status column to change the status for Step Number 201 to Completed, change the Status for Step Number 202 to In Progress, and then on the Quick Access Toolbar, click Save
. At this point, you have changed the data in the copy of the workbook that resides on SharePoint. -
Switch to Visio. On the Data tab, in the External Data group, click Refresh All, and then click Close. -
On the Quick Access Toolbar, click Save
. The changes from Excel that are now visible in Visio have been saved in SharePoint. -
Return to your open web browser. If the web view of the diagram has not already updated, click the Refresh button.
The web view of your Visio diagram reflects much more than changes
in data graphics. In the final steps of this exercise, you will add
several shapes to the Visio diagram and observe those changes in the
browser. -
Switch to Visio. Drag a Gateway shape from the BPMN Basic Shapes
stencil and drop it on the connector between the Start Event shape and the Print tickets shape, and then add a new connector from the top of the gateway to the Send Tickets shape. -
Type text on three shapes:
-
On the new gateway, type etickets?
-
On the connector from etickets? to Print tickets, type No. -
On the connector from etickets? to Send tickets, type Yes.
-
On the Quick Access Toolbar, click Save
. -
Switch to your browser and click the Refresh button. The browser view of your diagram shows the new shapes.
Note
CLEAN UP Save your changes to the Theater Ticketing Diagram file and close it. Close your web browser.
This exercise involved a lot of switching between
applications in order to demonstrate the interactions among those
applications. In the real world, you are unlikely to be moving back and
forth as much. For example, in a typical scenario, you would have
linked your diagram to data and selected a data graphic once, prior to
saving to SharePoint. From then on, you might periodically update a
database or Excel workbook and occasionally view the changes in your
browser. In another common scenario, you might be responsible for
maintaining and updating the data, while many other people use their
web browsers to view the dashboard you created.
|