EXCEL_FILE_OPEN

EXCEL_FILE_OPEN N,F

OPENS THE EXISTING FILE (SHEET) F AND ALLOCATES IT NUMBER N AS REFERENCE

  • Type: Command
  • Parameters: 2
  • Group: Excel

ACTION

The command EXCEL_FILE_OPEN N,F opens an existing file with the Microsoft Excel software, if it is running.

N is the number of EXCEL file on which the commands are targeted : it is the target file.

F is its name.

A file is a sheet in the vocabulary of Excel. It is possible to open several sheets simultaneously: they are identified by their number.

SYNTAX: EXCEL_FILE_OPEN N,F

  • N = Excel file number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of Excel files.
  • F = Path of the file (string) to be opened.

USE

  • The command is used to open an existing sheet with Microsoft Excel.

ERROR

  • If Excel software is not running.
  • If number N is not a correct expression.
  • If number N exceeds the maximum of allowed file number.
  • If number N is not greater than 0.
  • If number N is in use.
  • If F is not a correct expression.

EXAMPLE

rem launch Excel software

excel_start

rem wait for 5 secondes

wait 5000

rem open an existing file

excel_file_open 1,"MyFile.xls"

rem wait for 5 secondes

wait 5000

rem close this file

excel_file_close 1

rem stop Excel software

excel_stop

SEE ALSO

EXCEL_START

EXCEL_STOP

EXCEL_FILE_NEW

EXCEL_FILE_CLOSE

EXCEL_WRITE

EXCEL_READ$()