*DBOPEN

<< Click to Display Table of Contents >>

Navigation:  Reference > Pre-processor >

*DBOPEN

The *DBOPEN command opens a spreadsheet file. At present only Excel and Access files can be used.

VERY IMPORTANT: use quotes round the file name if it contains spaces.

VERY IMPORTANT: All cells in a spreadsheet for use with CL must be formatted as text. The only safe way to do this is to format all cells in the sheet as text before entering any contents. Formatting as text after entering the contents is not always successful. If you have problems try outputting the sheet to a CSV file and then load it back to a newly created sheet.

The form of the *DBOPEN command is:

[*DBOPEN fileindex =filename]

The index name fileindex can only be used in the *DBLOOP and *DBCLOSE commands. We recommend starting the name with DB.

Files opened with *DBOPEN should be closed with *DBCLOSE when they are no longer needed.

Any number of *DBLOOP commands can be used on an open file.

Examples of *DBOPEN commands:

[*dbopen dfNameFile=’Names List.xls’]

[*dbopen dfMain=C:\MyDB\Main.xls]