Consultor Eletrônico



Kbase 13618: DDE REQUEST returns strange characters at the end of string
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
DDE REQUEST returns strange characters at the end of string

If a customer uses a DDE REQUEST command to request data
from a Microsoft Excel spreadsheet. The character string
returned may contain two strange characters at the end of the
string.

These can be removed by using the SUBSTRING statement.

Here is an example of the code:

define var v-cell as char.
def var ddeframe as widget-handle.
def var sheet1 as integer.

create frame ddeframe
ASSIGN visible = true
hidden = true.

dde initiate sheet1 FRAME ddeframe APPLICATION
"Excel" TOPIC "Sheet1".

dde request sheet1 target v-cell ITEM "r10c3" TIME 0.

display v-cell.
pause.

ASSIGN v-cell = SUBSTRING(v-cell,1,length(v-cell) - 2).
DISPLAY v-cell.
DISPLAY INTEGER(v-cell) LABEL "Integer VAlue" WITH FRAME f1.

Progress Software Technical Support Note # 13618