Hi!
Im stuck on a problem I have.
My task is to create an in memory object structure based on the content of an excel file. The excel file represent widgets that can exist in an object hierarchy. The format of the excel file is like this
article description Level
=======================
0000 module car 0
0001 door 1
0002 handle 2
0003 screw 3
0004 bonnet 1
0005 spring 2
In vb.net these items are represented as generic Article objects. Each article has a property called "ChildArticles" which is a list of Articles.
The issue I have is that I can't come up with a cleer way to iterate through each line in the excel file and construct my object hierarchy. Maybe I even have to write a recursive method to do this.
All I have to play with is the level column. And if the number of level on the following line is bigger then it means that it is a child of the previous. Like, the door is a child of the car module and the screw is a child of the handle and the bonnet is achild of the module car.
Please help me out here... im stuck!!
Kind regards
/S
Im stuck on a problem I have.
My task is to create an in memory object structure based on the content of an excel file. The excel file represent widgets that can exist in an object hierarchy. The format of the excel file is like this
article description Level
=======================
0000 module car 0
0001 door 1
0002 handle 2
0003 screw 3
0004 bonnet 1
0005 spring 2
In vb.net these items are represented as generic Article objects. Each article has a property called "ChildArticles" which is a list of Articles.
The issue I have is that I can't come up with a cleer way to iterate through each line in the excel file and construct my object hierarchy. Maybe I even have to write a recursive method to do this.
All I have to play with is the level column. And if the number of level on the following line is bigger then it means that it is a child of the previous. Like, the door is a child of the car module and the screw is a child of the handle and the bonnet is achild of the module car.
Please help me out here... im stuck!!
Kind regards
/S