Importing data into Excel

  • Thread starter Thread starter \(a\)
  • Start date Start date
A

\(a\)

Hi

I have a text file called a.txt. I would like to import it into excel with
the headings domain, ip address, owner, administrative contact, technical
contact, name servers, additional data.

I'm not sure how I would go about doing that or if it is even possible. If
someone knows, would you be able to assist me please.

Below is what I would like the final excel spreadsheet to look like as well
as the contents of the file I would like to import (a.txt). I haven't
filled out the final excel spreadsheet, but all the columns would be filled
out with the data from a.txt.

Thank you.

*********************
Final Excel Spreadsheet
*********************

domain ip address owner administrative contact technical
contact name servers additional data
altavista.com
msn.com
yahoo.com

*********************
Contents of text file (a.txt)
*********************

<domain>
altavista.com

<ip address>
209.73.180.8

<owner>
Overture Services Inc.
74 N. Pasadena Ave., 3rd Floor
Pasadena, CA 91103
US

<administrative contact>
DNS Administrator, AltaVista
(e-mail address removed)
AltaVista Company
1070 Arastradero Road
Palo Alto, CA 94304
US

<technical contact>
AltaVista Company (ZPFBLYCBDO) (e-mail address removed)
1070 Arastradero Road
PALO ALTO, CA 94304
US

<name servers>
NS1.ALTAVISTA.COM 209.73.164.76
NS2.ALTAVISTA.COM 209.73.164.7

<additional data>
ALTAVISTA16-DOM
Created: 02-Oct-2002
Updated: 19-Oct-2003 21:34:46 EDT
Expires: 08-Sep-2010
Source: whois.networksolutions.com

==================================================

<domain>
msn.com

<ip address>
207.68.172.246

<owner>
Microsoft Corp
One Microsoft Way
One Microsoft Way
Redmond, WA 98052
US

<administrative contact>
MICROSOFT CORPORATION (EPMKOEAUSO) (e-mail address removed)
One Microsoft Way
Redmond, WA 98052
US

<technical contact>
MICROSOFT CORPORATION (EJSEHEQUAO) (e-mail address removed)
One Microsoft Way
Redmond, WA 98052
US
425-882-8080

<name servers>
DNS1.CP.MSFT.NET 207.46.138.20
DNS1.TK.MSFT.NET 207.46.245.230
DNS3.UK.MSFT.NET 213.199.144.151
DNS3.JP.MSFT.NET 207.46.72.123
DNS1.DC.MSFT.NET 64.4.25.30
DNS1.SJ.MSFT.NET 65.54.248.222

<additional data>
MSN-DOM
Created: 20-Aug-2002
Updated: 19-Oct-2003 21:34:45 EDT
Expires: 09-Nov-2010
Source: whois.networksolutions.com

==================================================

<domain>
yahoo.com

<ip address>
66.218.71.198

<owner>
Yahoo! Inc.
701 First Avenue Sunnyvale
CA
94089 US

<administrative contact>
Domain Administrator
Yahoo! Inc.
701 First Avenue Sunnyvale
CA
94089 US
(e-mail address removed) +1.4083493300 Fax- +1.4083493301

<technical contact>
Domain Administrator
Yahoo! Inc.
701 First Avenue Sunnyvale
CA
94089 US
(e-mail address removed) +1.4083493300 Fax- +1.4083493301

<name servers>
NS4.YAHOO.COM 63.250.206.138
NS5.YAHOO.COM 216.109.116.17
NS1.YAHOO.COM 66.218.71.63
NS2.YAHOO.COM 66.163.169.170
NS3.YAHOO.COM 217.12.4.104

<additional data>
DOM-272993
Created: 1995-Jan-18
Updated: 2003-Apr-07 10:42:46
Expires: 2012-Jan-19
Source: whois.alldomains.com

==================================================
 
Excel isn't going to be able to do that with any built in functionality.
You would need to write a macro to read in the information and write it into
excel as you describe.

Also, your generalized description does not talk about how to deal with
things like nameservers have multiple lines - not the same number for each
entry. Are multiline entries like owner and so forth all put in one cell.

Here is a reference on reading textfiles:

http://support.microsoft.com/support/excel/content/fileio/fileio.asp
File Access with Visual Basic® for Applications
 
Yes, entries that have multiple lines would go into a single cell.

I will take a look at the reference you listed below.
 
Back
Top