Excel: Using COMMAND() to Send an Excecute String to Q+ELast reviewed: September 12, 1996Article ID: Q100655 |
The information in this article applies to:
SUMMARYIf you are using Microsoft Excel version 2.x, 3.0 or 4.0 and Q+E version 2.5, 3.0, or 3.0a, you can use the Microsoft Excel COMMAND() function to construct large execute commands and send them to Q+E a portion at a time. This function exists because some macro languages, such as the Microsoft Excel macro language, have limits on the size of character variables.
MORE INFORMATIONThe COMMAND() function requires two arguments. The first argument, op_num, is a number from 1 to 3 that specifies how Q+E receives and handles the second argument, exec_string. Note the following:
The following example assumes that Q+E is listed correctly in the PATH statement and that the file ADDR.DBF is in the subdirectory C:\QE:
A1: chan=INITIATE("qe","system") A2: =EXECUTE(chan,"[command(1,'[open(''select * from ')]") A3: =EXECUTE(chan,"[command(2,'dbasefile|')]") A4: =EXECUTE(chan,"[command(3,'c:\qe\addr.dbf'')]')]") A5: =RETURN() The example above is equivalent to the following macro:
A1: chan=INITIATE("qe","system") A2: =EXECUTE(chan,"[open(''select * from dbasefile|c:\qe\addr.dbf'')]") A3: =RETURN() |
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |