How to Use DDE to Get Microsoft Excel Version in FoxPro AppLast reviewed: June 26, 1995Article ID: Q129791 |
The information in this article applies to:
SUMMARYThis article gives a convenient way to obtain the version of Microsoft Excel to which a DDE channel has been established in a FoxPro for Windows application.
MORE INFORMATIONIn the following example, the Microsoft Excel INFO() function is poked into a cell in the Microsoft Excel spreadsheet to which a DDE channel has been established. The value of this function is then returned to FoxPro. Sheet1 is the name of the worksheet used in the example, and Row 1 Column 1 (R1C1) was arbitrarily chosen to hold the function. Both of these choices can be modified at the developer's discretion.
Code SampleTo demonstrate this code example, type the following into a new program file (.PRG file) and run it:
channel = ddeinitiate('Excel','sheet1') success = ddepoke(channel,'R1C1','=INFO("release")') excelver = dderequest(channel,'R1C1') wait window excelverThe variable 'excelver' now holds the version number of Microsoft Excel.
|
Additional reference words: FoxWin 2.60a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |