Hi Folks -
I have a Network Configuration File (NCF) that I would like to parse in Excel 2010 to a workbook with sections of the file broken out to individual worksheets. I have written a few small VBA scripts over the past few months and have enough experience to know what CAN be done, but I do not yet know HOW to do it.
An example of a typical NCF is attached. Here is a summary description of the file format:
- An NCF can be 10000 - 75000 lines
- The NCF is compsed of sections divided by two lines: one blank and the other containing the section name in "/*------------Add/Modify Widget------------*/" format
- Each section holds multiple rows of multiple fields with variable count of each from section to section
- Rows denote specifc network elements
- Fields denote specific parameter settings for the row
- Each field is comma and space delimited with the field name and value separated by "="
- Two fields occur in most sections as index fields: "XYZID" and "CN"
Here is a summary of the workbook format I want to develop
- Each section divider signifies the creation of a new worksheet in the workbook with the name of the worksheet taken from the divider (i.e. "Widget" for "/*------------Add/Modify Widget------------*/"
- Each worksheet uses the field names in the section as Row 1 header information
- Each worksheet uses either "XYZID" or "CN" (as appropriate for the section) for Column A
- Sections not having "XYZID" or "CN" use the leftmost field name for Column A
- Remaining cells are filled with the field values for the field names in Row 1
Any advice and coding examples are greatly appreciated.
Bookmarks