Using @OLE to Import Data from Excel
@OLE is an interface function for moving data back and forth from Excel using OLE based transfers. OLE transfers are direct memory transfers and do not make use of intermediate files. When using @OLE, LINGO loads Excel, tells Excel to load the desired spreadsheet, and requests ranges of data from the sheet. You must have Excel 5, or later, to be able to use the @OLE function. The @OLE function may be used in the data and initsections to import data.
@OLE can read both set members and set attributes — set members are expected in text format, while set attributes are expected in numeric format. Primitive sets require one cell of data for each set member (i.e., one set member per cell). You will need n cells of values to initialize each n-dimensional derived set member, where the first n cells contain the first set member, the second n cells contain the second set member, and so on.
@OLE can read one or two-dimensional ranges (ranges on a single worksheet in Excel), but cannot read discontinuous or three-dimensional ranges (ranges that traverse more than one worksheet in Excel).
Ranges are read left-to-right, top-to-bottom.