Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can excel input data into specific fields in a text file?

Status
Not open for further replies.

routerman

Technical User
Jul 15, 2002
490
GB
I want to automate a process to generate a text file for loading into Cisco routers. These units can accept text file data as a configuration source. But odd spaces and hidden characters cause problems, which may (or may not) be an issue here.

So I have an excel spreadsheet that contains all the IP addressing and other details that someone has to manually add into a text file template. Question is, can this process be automated, and if so how?

For example, this text file needs an ip address entering:

Int f0/0
ip address x.x.x.x 255.255.255.0

Could I somehow replace the x.x.x.x value with a cell value from excel?

Then repeat this step for many different addresses?
 



Hi,

Put this all in a separate sheet.

Pad each column (trailing spaces or leading zeroes) to the number of characters you want to output.

Format Courier 8.

Save the Workbook.

SaveAs a Space Delimited TEXT file (.prn) This will save ONLY that sheet in space delimited, fixed width format.


Skip,

[glasses] [red]Be Advised![/red] The only distinction between a bird with one wing and a bird with two, is merely...
a difference of A Pinion! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top