Programming Previous page   Next Page

Lotus 123 Spreadsheets

This section covers

See the wk1finfo, wk1write, and wk1read reference pages for more detailed information and examples.

Getting Information About the File

Use the wk1finfo function to determine if a file contains a Lotus WK1 spreadsheet:

Inputs to wk1finfo are

Outputs from wk1finfo are

Example -- Querying a WK1 File.   This example returns information about spreadsheet file matA.wk1:

Exporting to the File

Use the wk1write function to export a matrix to a Lotus spreadsheet file. You have the choice of positioning the matrix starting at the first row and column of the spreadsheet, or at any other location in the file.

To export to a specific location in the file, use the second syntax, indicating a zero-based starting row and column.

Inputs to wk1write are

Example -- Writing to a WK1 File.   This example exports an 8-by-8 matrix to spreadsheet file matA.wk1:

Importing from the File

To import data from the spreadsheet into the MATLAB workspace, use wk1read. There are three ways to call wk1read. The first two shown here are similar to wk1write. The third enables you to select a range of values from the spreadsheet. You can specify the range argument with a one-based vector, spreadsheet notation (e.g., 'A1..B7'), or using a named range (e.g., 'Sales').

Inputs to wk1read are

Outputs from wk1read are

Example -- Reading from a WK1 File.   Read in a limited block of the spreadsheet data by specifying the upper-left row and column of the block using zero-based indexing:


Previous page  Working with Spreadsheets Working with Scientific Data Formats Next page

© 1994-2005 The MathWorks, Inc.