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

sids911

New member
Local time
7:23 PM
Messages
1
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 My Computer

At a glance

Windows 7 ultimate x64
OS
Windows 7 ultimate x64
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.

Source-1.GIF


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

Source-2.GIF
Source-3.GIF
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

Source-5.GIF
Source-6.GIF


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

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

Source-7.GIF
Source-8.GIF


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

Source-9.GIF


Delete all of the hash marks (#):

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

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

Word_after_replace.GIF

Save the txt file and close Word.

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

Excel-open.GIF


Select your text file.

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

Excel-1.GIF
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.

Excel-3.GIF
Excel-4.GIF


Done.

Save it.

Regards,
GEWB
 
Last edited:

My Computer My Computer

At a glance

Linux Mint / XP / Win7 Home, Pro, Ultimate / ...
Computer type
PC/Desktop
Computer Manufacturer/Model Number
(7 different computers booting up to 10 systems)
OS
Linux Mint / XP / Win7 Home, Pro, Ultimate / Win8.1 / Win10
Other Info
Four desktops, two laptops, one notebook and one tablet
Great post GEWB! this should be a "sticky".
 

My Computer My Computer

At a glance

Originally Win 7 Hm Prem x64 Ver 6.1.7600 Bui...Intel i3 530 2.93GHz, 2933MHz 2 Cores 4 Logic...6GB of 1,333MHz DDR3 SDRAM32MB Intel Graphics Media Accelerator HD IGChip
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Gateway DX4831-01e (Mid-Tower Desktop)
OS
Originally Win 7 Hm Prem x64 Ver 6.1.7600 Build 7601-SP1 | Upgraded to Windows 10 December 14, 2019
CPU
Intel i3 530 2.93GHz, 2933MHz 2 Cores 4 Logical Processors
Motherboard
Gateway H57M01 133 megahertz
Memory
6GB of 1,333MHz DDR3 SDRAM
Graphics Card(s)
32MB Intel Graphics Media Accelerator HD IGChip
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
Gateway HX2000 20inch TFT active matrix TN
Screen Resolution
1600 x 900 x 59 hertz
Hard Drives
WDC WD10EADS-00M2B0 [HDD] (1000.20 GB) -- drive 0,
HL-DT-ST DVDRAM GH41N [CD-ROM dr]
Four card readers, and Four USB 2.0
PSU
300watts.
Case
Mid-Tower Desktop
Cooling
Stock from Gateway
Keyboard
Natural Ergonomic Keyboard 4000, see Other Info
Mouse
Orig. Gateway wore out now using Insignia USB wired optical
Internet Speed
Vz FIOS 10ms png 57.64Mbps down 65.53Mbps up Speedtest.org
Antivirus
Zamana Anti-logger with Anti-malware, MSE, Windows Firewall,
Browser
IE11.0.9600.19399-Upd ver11.0.135, Firefox 68.0.1 x64
Other Info
System Specs by Belarc.

BIOS: American Megatrends Inc. P01-A0 11/17/2009

Replaced the MS 'Natural' Standard PS/2 Enhanced 101-102 Keyboard with a new Natural Ergonomic Keyboard 4000 on August 1st 2014.

Canon Pixma MG3222 Printer.

Updated to IE11 on 12102015 | Fios Quantum Router g1100

Additional AV: SpywareBlaster, manual Mbam, SAS
Back
Top