Using Visio Shape Reports to export detail from your diagrams

Ran cross another handy feature of Visio – Shape Reports!

If you’re like me and love manipulating data in Excel to clean up and use elsewhere, rather than doing it the long, slow and manual way, then you will probably like to explore this feature of Visio.

I recently created a state chart and I needed a quick export of all of the states I used on the diagram.

Sure, I could manually type them out, or individually copy and paste each one into a document, but that’s now how I like to operate! If there’s a tool for the job – I like to use it.

So I opened up the ‘Shape Reports’ option under the ‘Review’ ribbon and begin to design my extract.

We want to create a new report, so go ahead and click that to begin the new report wizard.

Now, depending on what you’re doing or what data you’re trying to extract out of your model, you can export everything (easiest – but takes longer to clean up) or put some criteria around what you want to export (little bit trickier but my favorite!)

Easiest option is to create an export using the ‘Shapes on the current page’ and click through the wizard with the default options  and selecting  ‘Show all properties’. This will give you a dump of all properties and you can filter through what you need in Excel.

Personally I like to extract just what I need from the model, so I set some export criteria using the ‘Advanced’ option on Wizard step numero uno.

Here you can define some conditions for what you want to pull out of your model. For the above example I’ve opted to ignore the transition shapes as I just want to see a list of state names.

Play around with what’s available, particularly under the ‘Master Name’ property, to find the criteria your after.

So proceeding with example of not including ‘transition’ elements, you can then move on to selecting what properties to export.

Again, depending on what your modelling and how you defined it, your requirements may differ here. In my example I’ll be using ‘Displayed Text’ – as that’s the exact data set I’m looking for.

Give your a report a name on the next step and then a report definition (for recognizing the report later on!).

Double click your newly created report to see the results.

You need to select an export format, as I said earlier, Excel is my personal favourite for manipulating large amounts of text and filtering – but the choice is entirely yours of course.

Voila! Your data is exported in a lovely styled format ready to use as you please.

I kind of skipped over the selecting the report criteria section, so if anyone would like more guidance in that area let me know!