| Special Command Tags |
|
| Format | OPEN (chan[,fileopt])"[DDE]dde_app;params" Where: |
|
| [DDE] | File tag clause to inform ProvideX that it will be opening an external Dynamic Data Exchange (DDE) application. |
|
| chan | Channel or logical file number to open. | |
| dde_app | Path and/or name of DDE application; e.g., Excel. String expression. | |
| fileopt | File options. | |
| params | Optional DDE-specific parameters. Semicolon-separated arguments and/or variables to receive returned values, etc. (Early implementations of ProvideX used a vertical bar instead of a semicolon as separator — both are now acceptable). Please refer to the documentation supplied with the individual product or application to determine how to communicate with it using the [DDE] link. |
|
| *Note* | For use in WindX or Windows only. | |
| Description | The [DDE] tag is used as a prefix in an OPEN statement to denote that ProvideX is to route all file I/O requests to an external DDE application; e.g., Excel. ProvideX recognizes the tag and deals with it internally at run time. You can associate a CTL value with an item in a DDE application to have ProvideX generate the CTL value automatically whenever the value of the associated item changes; e.g, 0010 DEFCTL (dde_fileno)"item"=ctl_event |
|
| Example | This example illustrates an export to an Excel spreadsheet. Note that the worksheet name is optional, but the worksheet must exist if you include its name. This example also demonstrates the use of $09$, Tab , as the separator for Excel and makes selective graphical requests to draw a pie chart, etc.: 0010 OPEN (1)"[WDX][DDE]excel;existing_worksheet.wk1" ! or 0010 OPEN (1)"[wdx][dde]Excel;" 0020 OPEN (2)"SALES" 0030 LET R=0 0040 LOOP: 0050 LET DIV_ID$=KEY(2,END=DRAW_IT) 0060 READ (2,KEY=DIV_ID$)DIV_NAME$,DIV_SALES 0070 LET R=R+1 ! Bump row number 0080 LET K$="R"+STR(R)+"C1:R"+STR(R)+"C2" 0090 WRITE RECORD (1,KEY=K$)DIV_NAME$+$09$+STR(DIV_SALES) 0100 GOTO LOOP 0110 DRAW_IT: 0120 IF R=0 THEN STOP ! No divisions 0130 LET X$="R"+STR(R) 0140 WRITE RECORD (1)"[select(""R1C1:"+X$+"C2"","""+X$+"C2"")]" 0150 WRITE RECORD (1)"[new(2,1)]" 0160 WRITE RECORD (1)"[gallery.3d.pie(6)]" 0170 WRITE RECORD (1)"[window.maximize()]" 0180 WRITE RECORD (1)"[app.maximize()]" |
|
| See Also | WRITE RECORD Directive OPEN Directive |
|