Working with Lotus 1-2-3 Worksheets

Lotus Development Corporation’s 1-2-3 product line includes the following worksheet versions supported by the Microsoft Jet IISAM driver for Lotus: Lotus WKS, Lotus WK1, Lotus WK3, and Lotus WK4. Specific versions of Lotus worksheets allow different amounts of access to the data when linked or opened through the Lotus IISAM driver:

Specifying Sheets and Ranges in Lotus Worksheet Files

You can specify a subset of the available data when you open a Lotus 1-2-3 single- or multiple-sheet worksheet file. In single-sheet files, you can open the entire sheet, a named range of cells, or an unnamed range of cells. In a multiple-sheet file, you can open a single sheet, a named range anywhere in the multiple-sheet file, or an unnamed range in a single sheet. The following table lists the conventions for the DATABASE and source connection string arguments you must supply to access each of these objects.

To access this object In this Lotus version Use this syntax
Entire sheet in a single-sheet file WKS and WK1 Set the DATABASE argument to the fully qualified network or directory path, without a file name. Set the OpenRecordset method’s source argument to the file name as filename#wks or filename#wk1.
Entire sheet in a multiple-sheet file WK3 and WK4 Set the DATABASE argument to the fully qualified network or directory path to the multiple-sheet file, including the multiple-sheet file name. Set the OpenRecordset method’s source argument to sheetname:, where sheetname is the name of the worksheet.

Important You must follow the worksheet name with a colon (:).

Named range of cells in a single- or multiple-sheet file WKS, WK1, WK3, and WK4 Set the DATABASE argument to the fully qualified network or directory path to the single- or multiple-sheet file, including the file name. Set the OpenRecordset method’s source argument to an existing named range as namedrange.
Unnamed range of cells in a single-sheet file WKS and WK1 Set the DATABASE argument to the fully qualified network or directory path to the worksheet file, including the worksheet’s file name. Set the OpenRecordset method’s source argument to the range of cells you want to access, such as A1..Z256.
Unnamed range of cells in a multiple-sheet file WK3 and WK4 Set the DATABASE argument to the fully qualified network or directory path to the multiple-sheet file, including the file name. Set the OpenRecordset method’s source argument to sheetname:range. For example, to access cells A1 through D12 in worksheet named 1996 Sales, you would set the source argument to 1996 Sales:A1..D12.

Note You cannot specify a value in a range that exceeds the maximum number of rows, columns, or sheets for the worksheet. See your Lotus 1-2-3 documentation for these values.

For examples that illustrate the concepts discussed in this section, see the “Microsoft Excel Sheet and Range Specification Examples” section later in this chapter.