Question Excel Automation

cubesd

New member
Joined
Aug 2, 2010
Messages
1
Programming Experience
1-3
Hi Peeps,

I honestly hope there is someone out there who would be able to assist me in this matter. I'm busy developing an application in VB .NET 2010 Express. Yeah, so no reporting functionality included. Sucks. But anyway, I'm trying to do Excel automation from VB and it seems just as difficult than the rest of the "free" reporting tools out there.

On my form I have 4x Combo-boxes and 2x Listviews. The user will select information from the 4 various boxes and then filter the information to display the filtered results. From the results, it must complete the Excel template (see image). I've managed to get some of the information completed especially for the rows. My problem is as follows:

On the report you will see there are three columns (Assessment Groups) named Group 1, Group 2, Group 3. After the user has selected the criteria, the system will query the table and must load the group names in there. Underneath the groups you will see there is columns named Base Scores. These items must be completed according to the selected criteria (extracted from a different table where the group names match).

So the actual problem is the fact that for the listview I can utilise "For i=0 To Listview1.Items.Count - 1". The integer (i) will increase as it reads through the listview. But for adding the results in the query to the columns (Group 1, 2, 3), I can't use that statement and neither can I use "Do While...Loop" as the column identifier (A, B, C, D, etc) will constantly change but the integers will remain the same.

e.g. The main group names will load into L8, R8 and X8. Then, any assignments that correspond to the group names must load into L11, M11, N11, etc... From there the corresponding base score for the assignment will load into L10, M10, N10, etc...

Image:
Capture.JPG

How do I go about doing this? For the learners it will be loading it with the "For...End For" statement.
 
Back
Top