Please Help - Data in Text File to be arranged in Excel in a specific


  1. Posts : 1
    Windows 7 ultimate x64
       #1

    Please Help - Data in Text File to be arranged in Excel in a specific


    Hello Everyone, Its my first post here

    I have a text file with values printed like these;

    BSSID: 001E4ABXXXX
    Last seen: 14/12/2011 - 16:06:12
    Vendor: Cisco Systems
    Signal: -91 dBm
    SSID: NXXXX
    Enc: OPEN
    Mode: Infrastructure
    Channel: 1 (2412000 Hz)
    Rates (Mbps): 11, 12, 18, 24, 36, 48, 54,
    Packets: 25
    Unique WEP IVs: 0

    BSSID: C03F0E3XXXXX
    Last seen: 14/12/2011 - 15:57:27
    Vendor: NETGEAR
    Signal: -96 dBm
    SSID: Misuss
    Enc: WEP
    Mode: Infrastructure
    Channel: 1 (2412000 Hz)
    Rates (Mbps): 6, 9, 12, 48, 18, 24, 36, 54,
    Packets: 7
    Unique WEP IVs: 0

    BSSID: 001E4ABXXXXX
    Last seen: 14/12/2011 - 15:56:49
    Vendor: Cisco Systems
    Signal: -95 dBm
    SSID: Mobile
    Enc: WPA2-CCMP-MGT
    Mode: Infrastructure
    Channel: 1 (2412000 Hz)
    Rates (Mbps): 11, 12, 18, 24, 36, 48, 54,
    Packets: 2
    Unique WEP IVs: 0



    I want to export this all to an excel spreadsheet with columns representing BSSID, Last Seen, vendor, Signal, SSID, Enc, Mode etc., and all the values belonging for an BSSID in a single row. Does it look doable? If yes, please let me know how to achieve this, and I will be highly obliged.

    Much thanks!

    Sid
      My Computer


  2. Posts : 1,030
    Linux Mint / XP / Win7 Home, Pro, Ultimate / Win8.1 / Win10
       #2

    First, two questions: how proficient are you with Word and Excel? Are you comfortable using the REPLACE function in both?

    If reasonably proficient and comfortable (understand) with the REPLACE function, it isn't difficult and will take about 15 minutes to accomplish what you seek.

    Open the text file in Word.

    Turn on the SHOW ALL switch (the paragraph mark icon).

    Your post example has MANUAL LINE BREAKS after each line - if the source file has them, replace all of them with PARAGRAPH MARK.

    Please Help - Data in Text File to be arranged in Excel in a specific-source-1.gif


    Add a PARAGRAPH MARK (Enter) at the very beginning of the document.

    Please Help - Data in Text File to be arranged in Excel in a specific-source-2.gif
    Please Help - Data in Text File to be arranged in Excel in a specific-source-3.gif
    Please Help - Data in Text File to be arranged in Excel in a specific-source-4.gif


    Replace DOUBLE PARAGRAPH MARKS with PARAGRAPH MARK, hash mark (#) - makes it easier to see what you are doing next - and PARAGRAPH MARK like this:

    Find what: ^p^p
    Replace with: ^p#^p

    Please Help - Data in Text File to be arranged in Excel in a specific-source-5.gif
    Please Help - Data in Text File to be arranged in Excel in a specific-source-6.gif


    Now add the tilde (~) in front of each line:

    Find what: ^pBSSID:
    Replace with: ^p~BSSID:

    Please Help - Data in Text File to be arranged in Excel in a specific-source-7.gif
    Please Help - Data in Text File to be arranged in Excel in a specific-source-8.gif


    Repeat for each line of a record (total of 11 times).

    Please Help - Data in Text File to be arranged in Excel in a specific-source-9.gif


    Delete all of the hash marks (#):

    Find what: ^p#^p
    Replace with: ^p

    Please Help - Data in Text File to be arranged in Excel in a specific-source-10.gif


    Now your records are:
    > Separated by a carriage return (paragraph mark)
    > Fields are separated by the tilde (~)
    > The first imported column will be EMPTY

    Please Help - Data in Text File to be arranged in Excel in a specific-word_after_replace.gif

    Save the txt file and close Word.

    Open Excel.
    Open file type: All Files (*.*)

    Please Help - Data in Text File to be arranged in Excel in a specific-excel-open.gif


    Select your text file.

    In the import steps:
    Step 1: Delimited
    Step 2: deselect Tab and select Other, set to ~

    Please Help - Data in Text File to be arranged in Excel in a specific-excel-1.gif
    Please Help - Data in Text File to be arranged in Excel in a specific-excel-2.gif


    Click FINISH.

    Insert a header row and label each column.

    Select each colum one at a time and delete the corresponding record field leaders. Be sure to include the SPACE that follows the colon as part of the FIND WHAT.

    Please Help - Data in Text File to be arranged in Excel in a specific-excel-3.gif
    Please Help - Data in Text File to be arranged in Excel in a specific-excel-4.gif


    Done.

    Save it.

    Regards,
    GEWB
    Last edited by GEWB; 21 Dec 2011 at 16:31.
      My Computer


  3. Posts : 5,605
    Originally Win 7 Hm Prem x64 Ver 6.1.7600 Build 7601-SP1 | Upgraded to Windows 10 December 14, 2019
       #3

    Great post GEWB! this should be a "sticky".
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:40.
Find Us