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!

Importing data from CSV file

Status
Not open for further replies.

nfl02

Technical User
Oct 30, 2000
18
GB
Any ideas on how I can get ASPECT to retrieve a field from a CSV file? I want to automate my PBX programming by having the script refer to an external file for the responses to certain prompts returned by the PBX i.e. phone number, name etc.
 
The only thing that I have ever been able to get it to work is to save from excell as *.CSV, then open that file in a plain text editor (such as notepad) and save it again as *.TXT. Once it is a *.TXT, it's pretty simple to get aspect to recognize it. Here is part of a script that gets data from an external, comma seprated, text file:

...
fopen 3 sourcefile Read
fgets 3 datastr
strtok indexnumber datastr "," 1
strtok hospitalnum datastr "," 1
strtok accountnum datastr "," 1
...

this will read the current line of the source file, and break it into three seprate strings.

I hope that this helps,
William Sheehan


 
I am trying to get aspect to get text from a .csv(saved as .txt)file. I would like the script to get on line of values (4 values in total) and return to them to procomm screen. I am brand new to aspect scripting and would very much appreciate any help.

Thankx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top