VoiceGuide IVR Software Main Page
Jump to content

Return Data

Recommended Posts

In Run VBS module,I write this script .

I want to read data form a Excel,and I think it could return to VoiceGuide ,so that I could use SayNum module to say it.

but unluck,it only read "value1" not read the data in this value1.

how coulde i do this? and it possible?

 

dim objExcel

set objExcel=CreateObject("Excel.Application")

dim filename

filename="D:\Book1.xls"

dim objWorkbooks

set objWorkbooks=objExcel.WorkBooks.Open(filename)

dim objSheet

set objSheet=objWorkbooks.Sheets("Sheet1")

 

dim value1

dim value2

value1=objSheet.Cells(3,2)

 

 

objWorkbooks.Close

objExcel.Quit

 

dim vg

set vg=CreateObject("vgServices.CommandLink")

vg.Run_ResultReturn $RV_LINEID , "[PhoneNum] {value1}"

set vg=Nothing

set objExcel=Nothing

set objWorkbooks=Nothing

set objSheet=Nothing

Share this post


Link to post

The Run_ResultReturn call should use string concatenation to include any variables created in the script.

 

your current script has this:

 

vg.Run_ResultReturn $RV_LINEID , "[PhoneNum] {value1}"

 

The above will result in $RV[PhoneNum] holding value "value1".

 

Change the Run_ResultReturn in your script to:

 

vg.Run_ResultReturn $RV_LINEID , "[PhoneNum]{" & value1 & "}"

 

This will place he value of the value1 variable into the script returned to VoiceGuide.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×