Showing posts with label computer science. Show all posts
Showing posts with label computer science. Show all posts

Thursday, 19 June 2014

Experiments with XML Data files and Treeviews

Experimenting with XML files as format for storing configuration parameters and main data for applications. Using MSXML and XPath seemed difficult to directly get at the data, lot easier to extra attributes and their values than data records. So figured as a basic starting point see if could traverse the whole tree and display the data as an indented list in an Excel worksheet and also in a treeview form. I believe that XQuery is the mechanism to get data, but not sure how that relates to MSXML.

The main application is a subroutine called MainApplication. It contains various calls to subroutines which are either commented out or active. It is set to allow the user to select an XML file and open it and display in a treeview component. Sample data can be obtained from my barrier design application just extract the xml file from the zip file.

The subroutine: xmlDislayIndentedList will display the data in the worksheet and also display some information about the type of xml node. It also highlights with a green background the final leaf node containing the text data.

The worksheet can be obtained here: xmlExperiments.xls



Revisions:
[19/06/2014] Original
[23/04/2016] Changed download links to MiScion Pty Ltd Web Store

Bill of Materials and Equivalent Binary Tree

A simple spreadsheet using binary trees to build a bill of materials. Two displays are included:

  1. A simple indented list placed in the Excel worksheet
  2. An expandable/collapsible treeview component on a form.

The two main subroutines are:

  1. mainAppBuildTree (builds a tree and displays in worksheet as indented list)
  2. mainAppViewTree (builds a tree and displays in treeview component)

Data is taken from the worksheet. Two tables are required one listing all items and providing a unique key code for. Another list providing assembly definitions as single level bills of materials. These single level bills of materials are then exploded to build the entire product structure tree. To do this stacks are used.

The spreadsheet can be downloaded here: treeExperiments2014.xls

Other Experiments with Bill's of materials can be found on my ExcelCalcs profile:

  1. exploded BOM (Bill of Materials) 
  2. IE/POM/CAPM Automatic Explosion of Bill of Materials
  3. Indented Bill of Material
Actually revisited trees so could display an XML data file in a tree.




Revisions:
[19/06/2014] Original
[23/04/2016] Changed download links to MiScion Pty Ltd Web Store

Tuesday, 17 June 2014

Excel/vba Experiments with abstract Data Structures

Taken from the ExcelCalcs.com website.



Related Posts:

Bundle of my ExcelCalcs UpLoads

The bundle can be downloaded from MiScion Pty Ltd : Spreadsheet Bundle