473,480 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

VSTO VB.Net: link a treeview to an Excel Spreadsheet

10 New Member
Okay, I think this one is a really hard one for yous geniuses out there. I'm going to try my best to explain in as much detail as I can. And for the most part I just want to know if I'm doing this the right way of it there's an easier way to do it.

Background/Platform:
Windows XP
Office Excel 2007
Visual Studio Tools for Office 2008
Document level customization
VB.Net

I have a spreadsheet that is used to project which site(s) a person will be assigned to for the next six months. There are a number of Field Managers(4) each of whom are in charge of a number of Programs (not computer programs). Each Program has a variety of work locations and at each work location there is a number of Field Representatives.

A Field Manager may like to group their sites by type, for example there might be three Air National Guard sites that belong to the Hippo program. Or a Field Manager might want to group their sites by location; such as CONUS (Continental United States) or OCONUS. A site may in theory belong to more than one group. For example, Air National Guard site X could also be OCONUS.

So as we can see there's a hierarchy here that looks something like:

Field Manager/Program/Location (conus or Oconus)/site group/site

The spreadsheet looks something like this:

Field Manager 1
Hippo Program
OCONUS
OCONUS Site 1
Employee 1
Employee 2
Employee 3
OCONUS Site 2
Employee 4
Employee 5
OCONUS Site 3
Employee 6
CONUS
ANG Sites
ANG Site 1
Employee 7
Employee 8
ANG Site 2
Employee 9
CONUS Site 1
Employee 10
Employee 11
Elephant Program
More Site Groups with Sites and Employees
Field Manager 2
Organized much the same as Field Manager 1


Now, what I've done is I've added a treeview control with checkboxes to a custom actions pane. I would like to assign each treeview node to a given site and when I uncheck a Treeview node it'll hide the rows that are associated with that node. However, if I uncheck a Site Group, I want it to uncheck all childnodes below it and hide all the rows in the spreadsheet that make up that site group. For example, say I want to filter out OCONUS Site 1 then I'll just uncheck it's checkbox in the treeview and it'll go through the spreadsheet and hide OCONUS Site 1 and the employees underneath it.

So I'm thinking that for each row in the spreadsheet, I could have a column along the left hand side that includes a treeview path. And then use the Range.Autofilter method to search through the column finding rows that contain Program Name, or Site Group Name, or Site.

What I had done earlier was created five columns to the left of my spreadsheet and named each one "Manager", "Program", "Location", "Site Group", and "Site" accordingly. And then filled in the info to identify each row. But ran into problems.

Anyway, is does anyone know of a way to get a treeview node to figure out on it's own which rows to hide in an excel spreadsheet? Could I have possibly written this post with more complexity? And it probably sounds like I'm just asking someone else to do it for me, but I hope not. Thanks anyway for anyone who can give me a better idea of how to do this.

Would databinding my treeview to my spreadsheet do what I'm talking about?
Oct 8 '08 #1
0 2182

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2200
by: VP | last post by:
Could you guys please resolve this problem for me? My web form is accessing a Excel spreadsheet. I can read text info from (each cell) an excel spreadsheet. But, there's a Shape object in excel,...
9
1605
by: CDARS | last post by:
Dear all, I understand that: 1) Server-Side Office automation is not recommended by MS (KB257757). 2) OWC is a client-side ActiveX Technology, NOT an ASP.NET server control. 3) OWC9 has...
4
6387
by: john andrew | last post by:
-- hello In VB.net can I import an excel spreadsheet into a formand display it. Also edit/save cells also on the form. I want to use code in VB.net form that also effect the spreadsheet....
13
1919
by: Howard Kaikow | last post by:
I just visited the MSFT web site and saw the comparison/pricing of the different VS 2005 versions. I was looking for a statement of the system requirements for VS Pro and VSTO, could not find. ...
15
6886
by: Enrique | last post by:
Question I am posting this question again (3rd time) because some issues with my no spam alias. Here it is the question: I have not been able to run unit tests for a VSTO (2005) project. I...
2
2783
by: Le | last post by:
Folks, I'm trying to do some office automation using VSTO 2005. I've verified that ..Net Programmability Support is installed for every MS Office application and Microsoft Forms 2.0 .Net...
5
1573
by: Toulousse | last post by:
Hi, I'm currently a VB6 developer and I write mostly office type apps (not always Office though). At this point in time I have a project where I need to develop an add-in for Microsoft Project....
10
3873
by: bill | last post by:
I have been searching everywhere AND am a bit new to vb .net/aspx, but can't seem to find anything that works. Specifically, I need to export a dataset from a webapp written in vb .net to a new...
1
927
by: =?Utf-8?B?Um9iZXJ0IFNtaXRo?= | last post by:
Hi, I have an excel spreadsheet in a location and I wish to open it from a link in asp.net page. How do I create an instance of excel and then open this document from a link Thanks Robert
0
6911
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6743
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2999
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.