Hello.
I am trying to get values from Excel into DIAdem 8. To find out, which Excel sheets are currently available, the topic "System" knows and delivers their names as a list when queried with "topics" as item to a DDERequest, such as in the folowing word macro
------------Word Macro---------------------
Sub test2()
'
' test2 Makro
' Makro erstellt am 22.06.2006 von MConze
'[Vlies_DoE_060404.xls]R01
Dim cmd As String
Dim chan As Long
chan = DDEInitiate(App:="Excel", Topic:="System")
topicList = DDERequest(Channel:=chan, Item:="Selection")
Selection.InsertAfter topicList
DDETerminateAll
End Sub
------------Word Macro---------------------
which delivers an output such as
[book1.xls]Tabelle1 [book1.xls]Tabelle2 [book1.xls]Tabelle3 System
However, DIAdem returns a different result upon the same DDERequest:
-----------DIAdem VBS ----------------
On Error Resume Next
Set Excel = GetObject(, "Excel.Application")
If Err.Number <> 0 Then
Set Excel = CreateObject("Excel.Application")
End if
err.clear
call DDEClose()
call DDEOpen("Excel","System")
call DDErequesttext("Topics",1000)
msgbox DDEreqvalue
'call DDErequesttext("Protocols",1000)
'msgbox DDEreqvalue
'call DDErequesttext("Selection",1000)
'msgbox DDEreqvalue
'call DDErequesttext("Status",1000)
'msgbox DDEreqvalue
'call DDErequesttext("Sysitems",1000)
'msgbox DDEreqvalue
'call DDErequesttext("Formats",1000)
'msgbox DDEreqvalue
call DDEclose()
-----------DIAdem VBS ----------------
will only give
System
as output.
It is not a matter of more than 1 word, as can be seen when other topics to "System" are called.
Neither is it possible to call a value by
Application Excel