+ Reply to Thread
Results 1 to 4 of 4

Network Config File to .xlsx Parser

Hybrid View

  1. #1
    Registered User
    Join Date
    06-06-2012
    Location
    Norman, OK
    MS-Off Ver
    Excel 2010
    Posts
    3

    Network Config File to .xlsx Parser

    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.
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Network Config File to .xlsx Parser

    Hello willmccutcheo,

    Welcome to the Forum!

    It is good you included an example text of the text file. Would it be possible to see an example workbook showing some results for this file?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    06-06-2012
    Location
    Norman, OK
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Network Config File to .xlsx Parser

    Hi Leith -

    Thank you very much for the response. A workbook model of the output is attached. In putting it together I realized that there are a small handful of sections in an NCF that should be split in to two worksheets. An example in the snippet input file is the "Carrier" section, which was used for the "CCCC2000 Carriers" and "EEEE Carriers" worksheets due to a difference in field names beginning in Column G.

    Again, thanks for taking a look at my post!


    Best Regards,
    Will

  4. #4
    Registered User
    Join Date
    06-06-2012
    Location
    Norman, OK
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Network Config File to .xlsx Parser

    Has anyone had a chance to take a look at my project and come up with some pointers? I still have a need for this parser.

    Thanks!


    --Will

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1