in reply to data formatting in excel

A few questions:
  1. Is there a good reason you're not doing this in VB inside Excel vs. trying to do it in Perl?
  2. How are you extracting the data from the Excel file? Is this the problem step?
  3. If you have the data extacted, maybe with Spreadsheet::ParseExcel, then the problem can be reduced to "I have this data structrure and I need to iterate through it, grabbing various bits identified by (insert rules here)."
Figure out where the problem is and solve that, then go to the next step. It sounds to me that you haven't fully analyzed what the steps are to solving your problem.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: data formatting in excel
by pingme8705 (Acolyte) on Oct 03, 2005 at 02:41 UTC
    hai here's the answers. 1) i cannot use VB as this is going to happen in a remote pc that is nix based and need to go for higher authorities permission for software installation 2)The problem i have shown is diagramatic representation in excel. We are getting similar output when we extract data from out perl program. 3) since the commands may vary the output may range from 1 line to 50 rows.And as shown in the diagram , the first column will have the commands and the 2nd column will have the output of the commands. did i answered you ?
    pingme8705 The world belong to the people who beleive in the beauty of their drea +ms
      The first step you need to accomplish is to find some data structure that will enable your intended use(s) of the data. Once you have designed your target data structure, the method of converting your input data into your data structure is basic computer science. Once you have the conversion of your data into your data structure, do whatever it is you need to do with it.

      Your questions have been telling me that you don't know what data structure you should be using. Data structures are the heart of every program. If you don't know how you need to represent your data, then you can't work with it.


      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
        column 1 column2 sh run|in community snmp-server community Em3dfgfsfsk RO 80 snmp-server community EdfdgN3tS0l RW 83 show run |in encryption service password-encryption
        This is how it is.
        pingme8705 The world belong to the people who beleive in the beauty of their drea +ms