How to use DDE PACKAGE of developer 2k with EXCEL (specially DDE.EXECUTE

Please tell me how to use DDE.execute to format the
excel (97 or 2000)  worksheet from Developer 2000.

to use the dde.execute the syntax is
DDE.EXECUTE(channel_id,'[cmdstring]',timeout);

what are the different cmdstring here .
send some detail or source from where I may able to get the details.


Anil
anilsharmaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Computer101Connect With a Mentor Commented:
Question placed in PAQ

Computer101
E-E Admin
0
 
TimCotteeHead of Software ServicesCommented:
DDE is not necessarily the best method for manipulating Office applications such as excel. It is far simpler to use the Excel Object library and use OLE automation to deal with these applications.

Add a reference in your project to Microsoft Excel Object Library 8.0 ( or 9.0 for 2000) and you can then use the excel object model directly in VB:

Dim appExcel As Excel.Application
Dim wbkMyBook As Excel.Workbook
Dim shtMySheet As Excel.Sheet
On Error Resume Next
'Get an existing excel instance
Set appExcel = GetObject(,"Excel.Application")
If Err.Number <> 0 Then ' There is no instance
  Set appExcel = CreateObject("Excel.Application")
End If
On Error Goto 0
With appExcel
  Set wbkMyBook = .Workbooks.Open ("c:\MyFolder\MyWorkbook.xls")
  .Visible = True 'Default is not visible
End With
Set shtMySheet = wbkMyBook.Sheets("Sheet 1")
With shtMySheet
  .Cells(1,1) = "Hello"
  .Cells(2,2) = "Again"
End With
wbkMyBook.Save
appExcel.Quit
Set shtExcel = Nothing
Set wbkMyBook = Nothing
Set appExcel = Nothing

You can use any of the standard excel objects and functions using this method, if for example you record a macro in excel that does what you want you can then copy this code to VB and as long as you include the appropriate object first it will do exactly the same as the macro code in excel.
0
 
anilsharmaAuthor Commented:
I am not much aware of VB. But know little about VB.
Where I have to put this code ? In developer 2k form or report Or Excel Application.

The code which u have given is purly VB or Excel application code . Is this code is supported by Developer 2k .If yes how ?
If u have some D2k code. aboubt DDE Please send it to me by E-mail anilsharma64@epatra.com

Thanks for quick reply.
Waiting again for ur reply.

Anil
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
anilsharmaAuthor Commented:
I am not much aware of VB. But know little about VB.
Where I have to put this code ? In developer 2k form or report Or Excel Application.

The code which u have given is purly VB or Excel application code . Is this code is supported by Developer 2k .If yes how ?
If u have some D2k code. aboubt DDE Please send it to me by E-mail anilsharma64@epatra.com

Thanks for quick reply.
Waiting again for ur reply.

Anil
0
 
TimCotteeHead of Software ServicesCommented:
Anil, this forum is about sharing information and solutions to problems, as such even if I had any information to send it would be inappropriate to do so. The code sample I show is purely written in VB but manipulates the OLE automation objects of Excel. I must admit to some confusion when you keep mentioning "Developer 2K" what does this represent?

Please explain more clearly what you are actually trying to achieve and the applications/languages you are using (or trying to use).
0
 
anilsharmaAuthor Commented:
Developer 2000 contain Form 6.0 ,Report 3.0 and Graph 3.0. Basiclly it is Oracle product used as front end tool to develop the application.
It has own package to deal with OLE object like
OLE2.CREATE_OBJECT,
OLE2.Add_Arg
OLE2.Create_Arglist
OLE2.Destroy_Arglist
OLE2.Get_Char_Property
OLE2.Get_Num_Property
OLE2.Get_Obj_Property
OLE2.Invoke
OLE2.Invoke_Num
OLE2.Invoke_Char
OLE2.Invoke_Obj
OLE2.IsSupported
OLE2.List_Type

OLE2.Obj_Type
OLE2.OLE_Not_Supported
OLE2.Release_Obj
OLE2.Set_Property
These package are used to link the MS application.
There is no adequate help given how to use these package.

Basically I want to fetch the data from Oracle 8 table and mainplaute in Developer Forms 6.0 and then the data has to put into the excel worksheet.After putting the data I want to Save the excel worksheet,print out and so on.
 
0
 
anilsharmaAuthor Commented:
Please have some comments.
or suggest some books from which I may get this solution for the question.
0
 
DanRollinsCommented:
Hi anilsharma,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

anilsharma, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
ipesinCommented:
can you provide answe to this question?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.