Starts an ActiveX connection to Excel for XLGET or XLPUT.
XLINIT("filename")
"filename" |
- |
A string. The name of an XLS file to open. Defaults to the current running Excel Worksheet. |
A 1 if a connection is established, else 0.
xlinit()
W1: rand(10, 3)
xlput("A1:C10", W1)
W2: xlget("A1:C10")
xlclear
W1 == W2 is all ones, that is W1 and W2 are equivalent. A new instance of Excel is started and the data is retrieved from the current Sheet of the current Workbook. The Excel connection is then terminated.
xlinit("C:\my documents\dsp.xls")
W1: xlget("A1:C10")
W1 contains the data from cells A1 through C10 from the XLS file "C:\my documents\dsp.xls".
XLINIT closes any previous connection established by XLGET, XLPUT or a previous call to XLINIT and starts a new instance of Excel.
Use XLGET or XLPUT without XLINIT to connect to a running instance of Excel. XLCLEAR closes the connection.