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

How do I use a procomm script with excel to make changes

Status
Not open for further replies.

pbxtec

Technical User
May 30, 2005
17
CA
I would like to know if it is possible to create a procomm script that will interact with a microsoft excel spreadsheet to do programming on the PBX.

Thanks
 
here is an example of a dll link to an excel, this came from knob, over in the aspect forum, he;s the best out there, bar none.. i use tab delimited, save me debug and setup time.. if i was a any good at scripts, i would get a better job

Code:
proc main
   long LinkVar, SystemVar                      ;Variables containing DDE Id's.
   string szText                                ;Text read from DDE link to Excel.
   integer iRow                                 ;Row and column variables
   string sRowCol                               ;Holds request for row and column
   integer iLen                                 ;Holds length of string received from Excel

   iRow = 1                                     ;Start reading with row 1

   ;Set up DDE links to Excel's system and a spreadsheet. Excel
   ;must be running in order for this script to work properly.
   if ddeinit SystemVar "excel" "system"
      ddeexecute SystemVar "[FULL(TRUE)]"       ;Maximize the spreadsheet.
      if ddeinit LinkVar "excel" "sheet1"       ;Set up link to spreadsheet.
         while 1                                ;Loop forever.
            strfmt sRowCol "R%dC%d" iRow 3      ;Format request for data from current row, column 3
            dderequest LinkVar sRowCol szText   ;Read data from spreadsheet, current row, column 3
            strlen szText iLen                  ;Get length of string
            if iLen == 2                        ;Indicates empty cell
               exitwhile                        ;Exit the while loop.
            else
               ;your commands go here
            endif
            iRow++                              ;Increment row value
         endwhile
         ddeterminate LinkVar                   ;Break DDE link to spreadsheet.
         ddeterminate SystemVar                 ;Break DDE link to Excel.
      else
         errormsg "Couldn't establish DDE link to spreadsheet!"
      endif
   else
      errormsg "Couldn't establish DDE link to Excel!"
   endif
endproc

john poole
bellsouth business
columbia,sc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top