PDA

View Full Version : Merge two data inputs



maheshr68
09-08-2010, 03:51 AM
Greetings!!

1. An excel sheet contains data in columns as below--

Col A : IPAddress
Col B : Blank(no data at present)
Col C : Country
Col D : Region
Col E : City
Col F : Address
Col G : Email
Col H : Host Name
Col I : Resolved Name

2. An text file contains the Col B,F,G,H and I information as below--

==================================================
Order : 1
IP Address : 123.123.123.123
Status : Succeed
Country : ABCD
Network Name : PQRS
Owner Name : NOP (No Operation Policy)
From IP : 123.123.123.123
To IP : 123.123.123.123
Allocated : Yes
Contact Name : NS Cell
Address :
Email :
Abuse Email :
Phone :
Fax :
Whois Source : APNIC
Host Name :
Resolved Name :
==================================================

==================================================
Order : 2
IP Address : 123.123.123.124
Status : Succeed
Country : BCDE
Network Name :
Owner Name : NOP (No Operation Policy)
From IP : 123.123.123.123
To IP : 123.123.123.123
Allocated : Yes
Contact Name : NS Cell
Address :
Email :
Abuse Email :
Phone :
Fax :
Whois Source : APNIC
Host Name :
Resolved Name :
==================================================

==================================================
Order : 4
IP Address : 123.123.123.126
Status : Succeed
Country : WXYZ
Network Name :
Owner Name : LMOP ABC C PQR
From IP : 123.123.123.123
To IP : 123.123.123.123
Allocated : Yes
Contact Name :
Address :
Email :
Abuse Email :
Phone :
Fax :
Whois Source : APNIC
Host Name :
Resolved Name :
==================================================

==================================================
Order : 5
IP Address : 123.123.123.127
Status : Succeed
Country : PQRS
Network Name :
Owner Name : NOP (No Operation Policy)
From IP : 123.123.123.123
To IP : 123.123.123.123
Allocated : Yes
Contact Name :
Address :
Email :
Abuse Email :
Phone :
Fax :
Whois Source : APNIC
Host Name :
Resolved Name :
==================================================

Output is : to write
"Owner Name" value into Col B
"Address" value into Col F
"Email" value into Col G
"Host Name" value into Col H
"Resolved Name" value into Col I

for each IPAddress in the excel from the text file. Excel file can't be used as number of rows are greater than 64536.

Best Regards,
Mahesh

Sebastian H
11-05-2010, 03:05 PM
Excel file can't be used as number of rows are greater than 64536.

That's exactly what databases are for. You could e.g. use Microsoft Access for that.

Tinbendr
11-05-2010, 06:46 PM
for each IPAddress in the excel from the text fileI don't understand this.

The text file is the first data stream. What is the second?

What kind of file do you want this output to? A text file?

Sebastian's suggestion is the best.

Sebastian H
11-05-2010, 07:24 PM
The first one is in the XLS, the second one in the TXT file.

In Access, all you'd have to do is draw a line between the IP addresses in each table (or whatever your unique identifier is).