Importing Data Into Visio 2003 Pages

K

km7516

Have a visio document with hundreds of pages that define a standard
configuration. Each page represents a site specific configuration diagram
with text boxes that should contain site specific configuration data. The
data is in Excel all version 2003 and this won't change going to 2007 isn't a
option.

What I'm trying to figure out is how to pull or push the data contained in
an excel worksheet into the specific fields (text boxes). I've enable the
linkages to Excel and have had some initial success, however I don't
understand enough of Visio pull the data from excel using VBA.

I could do this by hand though the client has demonstrated a tendancy to
randomly change the data for sites which means having an automated approach
will same time in the long run.

What I want to do is open the visio document, open the excel
workbook/worksheet (this is real easy since I code this all the time), parse
through the workbook looking for a change indicator, when a change is
indicated find the correct visio page, activate that page and then pull the
data from the excel spreadsheet and populate the correct locations in on the
page (actually replace place holder data).

I've searched the web for examples of code, downloaded the SDK for visio and
I'm just not having any luck. A generic answer though appreciated isn't
going to help.

Thank you in advance,
 
A

AlEdlund

Are you starting with a 'clear page', or have the data properties and
page/shape layouts already been created?

When you say '2007' isn't an option, do you mean Visio or Excel? Visio 2007
Professional is strongly recommended for the drawing creation and
datalinking. They can be saved as v2003 for those that do not have access to
v2007.

When you say "specific fields(text boxes)" are you referring to 'text boxes'
or custom/data properties within shapes? The easiest implementation is when
the custom/data property names are the same as the column/field names. Then
it becomes read a row of data and apply it to the shape (examples in sdk on
how to change a custom property).

Data (imho) does not do well when split between two locations, is your data
repository the spreadsheets or the drawings? If the datasource is the
drawing then consider using the the database wizard for export and import.
It's relatively easy to implement.

"Have a visio document with hundreds of pages" is probably unrealistic. IME
separate documents for each site based on template drawings worked better.
On average we were changing site configs 2% to 3% per month. There are
examples in the sdk on how to open/save drawings. By naming the drawings
based on some form of site id and adding that as a field to your device(?)
record you can then link to the correct drawing, or page if you insist on
multipage documents.

This example uses MS Access for some of it's data needs, but it is pretty
close to what you're about to get into and demonstrates reading from a
source and exporting data.
http://msdn.microsoft.com/en-us/library/aa140253(office.10).aspx

al
 
K

km7516

The diagrams are built with filler data in text boxes. The data will be in
text boxes and isn't associated with any shapes. Each page is the same
except for the variable data (IP addresses, modem line, ASN, etc) all of the
data are in text boxes. A tempalte page was created with filler data as a
place holder.

The spreadsheet is the driving data repository - if it the data in the sheet
changes a VBA will be run to update the appropriate sheet.

As for 2007 corporate policy and licensing does not support or permit 2007
applications of any type. So the short answer is no 2007 even with its
features and challenges.

There will multiple 100 page documents which the data needs to be populated
into. You're correct the site won't change much after the implementation.
So this is a one time activity on a huge scale. There are at least two teams
completing the migration / update / upgrade activities.

I'll go through the references you've noted and see what additional
questions occur.

KM:)
 
A

AlEdlund

np, happy to help,
al

km7516 said:
The diagrams are built with filler data in text boxes. The data will be
in
text boxes and isn't associated with any shapes. Each page is the same
except for the variable data (IP addresses, modem line, ASN, etc) all of
the
data are in text boxes. A tempalte page was created with filler data as a
place holder.

The spreadsheet is the driving data repository - if it the data in the
sheet
changes a VBA will be run to update the appropriate sheet.

As for 2007 corporate policy and licensing does not support or permit 2007
applications of any type. So the short answer is no 2007 even with its
features and challenges.

There will multiple 100 page documents which the data needs to be
populated
into. You're correct the site won't change much after the implementation.
So this is a one time activity on a huge scale. There are at least two
teams
completing the migration / update / upgrade activities.

I'll go through the references you've noted and see what additional
questions occur.

KM:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top