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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with script reading from excel or txt file

Status
Not open for further replies.

Sennback

Vendor
Dec 13, 2002
333
SE
Hi,

I need a script wich is going in a loop and reads in data from an excel or txt file.

I am happy for everything that can help me, so even a script wich is made for something completely different that I can modify is perfect!
I know almost nothing about this but I am faliliar to programming other languages.

I need to program 1000 names into a meridian switch and has a file with both extension numbers and names.
So the script will have to be like this:
Start of loop
waitfor "DN "
transmit "86306^M" (here it should read extension)
waitfor " NAME "
transmit "test^M" (here it should read name)
waitfor " XPLN "
transmit "^M"
waitfor " DISPLAY_FMT "
transmit "^M"
Go to start of loop
 
I have several examples at that illustrate how to read from Excel (via DDE) or from text files. shows how to read data from an Excel spreadsheet using DDE. Here are a few scripts that show how to open and manipulate a text file (I would recommend viewing the discussion of these three scripts on the samples page):


Whichever method you choose, you will be in some sort of loop (for example, while not feof 0/endwhile for text files). You'll just need to insert your commands above into the script after it reads each piece of information.


aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top