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!

Procomm and DDE

Status
Not open for further replies.

lexer

Programmer
Jun 13, 2006
432
VE
I`m working with a procomm script from the thread thread448-1143875 to generate NPA codes, I've got a excel file with this:

NPA RLI
1200 2
1201 2
1202 3
1203 2
end


When I run the programm for creating NPA, It makes the following:

>LD 90
ESN000

MEM AVAIL: (U/P): 2500295 USED U P: 541292 71372 TOT: 3112959
DISK RECS AVAIL: 896
REQ NEW
CUST 0
FEAT NET
TRAN AC1
TYPE NPA

NPA


MEM AVAIL: (U/P): 2500295 USED U P: 541292 71372 TOT: 3112959
DISK RECS AVAIL: 896
REQ

ESN004

It doesnt send the information from the excel cells, It seems that excel cells are not being read, I tried a simple programm for reading a cell:

proc main
long LinkVar, SystemVar ; Variables containing DDE Id's.
string szText ; Text read from DDE link to Excel.

; Set up DDE links to Excel's system and a spreadsheet.
; must be running in order for this script to work properly.
ddeinit LinkVar "excel" "sheet1"
dderequest LinkVar "R1C1" szText ; Make hot link to row 1
usermsg szText ; Display cell contents.
endproc

But the usermsg display nothing, I've got the string "hello" in cell R1C1



 
I forgot to mention that I'm using office 2000
 
This should work...

Code:
; DDE test

string filename="test1.xls", szText
long LinkVar, ExcelLink 

proc main  
   if ddeinit ExcelLink "excel" filename                             
 
     if ddeinit LinkVar "excel" "sheet1"                         

       dderequest LinkVar "R1C1" szText    ; Make hot link to row 1
       usermsg szText                      ; Display cell contents.
      
     endif
  
   endif
endpr
:)
 
Thanks geirendre

I tried the programm and the usermsg box (aspect user message)appears blank, It seems that is not reading the R1C1 cell, Do I have to use a specific cell format (text for example)
 
That should work.

To rule out the obvious, you know that R1C1 refers to the top-left most cell in excel correct?

I believe any format of data should be supported, but I've never tested anything other then string.

I run several programs that are almost exactly the same as Lexer's sample.
 
I checked all and It seems to be okey.
I've got a Procom 4.8 demo version, Could This be the problem?
 
I've never seen a demo version of Procomm, but I can't imagine any functionality being disabled in it (maybe time-bombed of course).

I have several DDE sample scripts on the samples page of my site (link below) that you might try running to make sure there is not anything "off" with your Office install. There are a couple quick scripts that you should be able to download and run just to make sure everything is working OK.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top