Solved

Visio Script that can check excel row data and create a Flow chart with the data and save each row data into seperate IE files (Html)

Posted on 2008-10-18
20
815 Views
Last Modified: 2011-10-19
Hi,

Visio Script that can check excel row data and create a Flow chart with the data and save each row data into seperate IE files (Html)

in each excel in from row 3 i have say 40 + Colums of data.
I have this for 2000+ Rows.

i want each row data to be brought as an Flow chart as this.

Row1 Header                    Row1 Header             Row1 Header                  Row1 Header                  Row1 Header
Row3 data Colum A -     Row3 data Colum B -     Row3 data Colum C -     Row3 data Colum D -     Row3 data Colum E -     |                                             |                                     |                                 |                                          |
Row3 data Colum K-  Row3 data Colum H -         Row3 data Colum L -  Row3 data Colum R -         Row3 data Colum s -                        
I really dont know if this can be done. If possible then few more questions with follow (new Posts)

I should be able to change the colum No as wanted.

Regards
Sharath
0
Comment
Question by:bsharath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 14
  • 6
20 Comments
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 22762587
Three questions:

1) Is this request similar to what we did in this question:
http://www.experts-exchange.com/Microsoft/Applications/Microsoft_Visio/Q_23483233.html

If not, can you provide a mockup of both the input spreadsheet and the layout of the flowchart for one row of data? That would help a lot I think. You don't have to fill in every value or put every box on the flowchart -- just enough so I can see exactly what you have in mind.

2) When you say that you want a separate html file for each row, do you mean you want 2000 html pages, each of which contains one of the created flow charts? If so, do you want them as 2000 independent pages or as a set of 2000 pages in one "web site"?

3) I'm not clear what you mean about changing the column number... can you explain in more detail?
0
 
LVL 11

Author Comment

by:bsharath
ID: 22764386
Hi Scott...

1) No i guess

Attached are 2 files. 1 xls file that has all the headers and 1 row of data. Another file is vsd.

2) yes for each row i want a html file created as each row has 1 employers details.

3) In the attachment you would know...

I know that this is going to be a real pain and not sure if this is possible too.
I have created the flow of 70% data in the row. But will need to do it for the rest too.. Please dont take my diagram as the suggestion.Please addin your views that would be more useful and clear...

THX

Excel-to-Visio-Chart-to-Html.vsd.zip
0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 22780020
While it may be possible to mathematically lay out a bunch of shapes to create your chart, I don't think it's practical, primarily because it will never look like what you want.

I think that the better alternative is for you to create the master flowchart, arranged exactly the way you'd like it to look, then save that as a Visio template. With that starting point, it is possible to write a macro that creates a Visio page and an HTML page from each row of data.

Let me know if this makes sense. If so, I can tell you what you'll need to do first, then what we can do in a macro.

Re #3 above, I still don't understand what you're referring to about changing column numbers.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 11

Author Comment

by:bsharath
ID: 22783077
Yes Scott that would be fine... Any possible way to achieve it the easiest would be fine...

What i menat by changing colums is. If the macro is going to be based on Excel colums then thought to have a easy way of chaning the colum no. Anyways i think now we will not require that...
0
 
LVL 11

Author Comment

by:bsharath
ID: 22783078
Yes Scott that would be fine... Any possible way to achieve it the easiest would be fine...

What i menat by changing colums is. If the macro is going to be based on Excel colums then thought to have a easy way of chaning the colum no. Anyways i think now we will not require that...
0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 22786760
OK, here's the plan then; let me know if this makes sense:

I will write a macro that will create pairs of boxes with an arrow between them. The top box will contain the text of a cell in row one of the spreadsheet; the bottom box will be blank (but will have an internal Visio name equal to the row one text label so we an match it to the data later).

You will arrange the pairs of boxes into the flowchart style that you want; this will be the template that will be used to display all employee records.

I will write a macro that will create an employee "flowchart" in Visio. It will read a data row from Excel, create a page based on the template, then place the employee data into the appropriate boxes. Finally, it will use Visio's "Save as web page" function to create a set of web pages after all employee pages have been created. Note: the macro will not have any selection capability -- it will produce a page for every employee record in Excel. If you want to create pages for a subset of employees, you'll need to create a different spreadsheet.

All of this will take a while but I'll try to get the first macro created in the next week or so.
0
 
LVL 11

Author Comment

by:bsharath
ID: 22786801
Scott thanks a lot...

This feels great an impossible though of mine is coming on a shape now...

Thanks U...
0
 
LVL 11

Author Comment

by:bsharath
ID: 22786805
Scott thanks a lot...

This feels great an impossible though of mine is coming on a shape now...

Thanks U...
0
 
LVL 30

Accepted Solution

by:
Scott Helmers earned 500 total points
ID: 22818832
Here's a first pass at creating the pairs of title boxes and data boxes. You will be prompted to select an Excel file, then the macro will create the pairs of boxes with a connector line for each column that contains data.

Let me know what you'd like to have changed about the boxes and lines -- font sizes, line weights, line ends (arrowhead yes or no?), etc. All those things can be changed very easily with a line or two of code.

After we get the look the way you want it, you can create the template as I described above.

Create-and-arrange-text-boxes-ba.txt
0
 
LVL 11

Author Comment

by:bsharath
ID: 22818875
What is the file extension?
0
 
LVL 11

Author Comment

by:bsharath
ID: 22818877
What is the file extension?
0
 
LVL 11

Author Comment

by:bsharath
ID: 22818899
Got it... Thanks...
I have all the Headers with arrows and another box empty. Now should i arrange the boxes as i need?
0
 
LVL 11

Author Comment

by:bsharath
ID: 22818900
Got it... Thanks...
I have all the Headers with arrows and another box empty. Now should i arrange the boxes as i need?
0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 22818940
Sorry about the file extension -- I didn't notice that the EE upload process truncated the filename.

You can arrange the boxes if you like the font sizes, line weights, etc. However, if you want anything changed, it would be easier to do it now before you arrange the shapes on the page.
0
 
LVL 11

Author Comment

by:bsharath
ID: 22818953
All are fine Scott. Is the next task to arrange?
0
 
LVL 11

Author Comment

by:bsharath
ID: 22818954
All are fine Scott. Is the next task to arrange?
0
 
LVL 11

Author Comment

by:bsharath
ID: 22818961
One question when arranging some colums i would not want them. So can i delete them while arranging?
0
 
LVL 11

Author Comment

by:bsharath
ID: 22818962
One question when arranging some colums i would not want them. So can i delete them while arranging?
0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 22820801
Yes to both questions -- you can arrange the shapes any way that you'd llike, and you are free to delete any that you don't need.

If you don't mind, why don't you close this question, assuming the macro creates the shapes you need, then open a related question about filling the data into the template you create.
0
 
LVL 11

Author Comment

by:bsharath
ID: 22822140
Thanks a lot for all the help Scott... I have posted another Q ...
Should i do all the visio graph and post it here or will the script do it any ways in pulling the data if the headers match?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article we’ll examine containers. We’ll explore lists (http://www.experts-exchange.com/Microsoft/Applications/M…
Book Review: Using Microsoft Visio 2010 by Chris Roth   Disclaimer: The author of Using Visio 2010 is a friend and fellow Visio MVP. Whether you’re new to Visio or are upgrading to Visio 2010 from a previous version, you will find a lot to like…
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question