Реферат: Task for the laboratory work
Remarks
Most software packages store their data in a file format that cannot be opened directly in FoxPro. IMPORT creates a new FoxPro table/.DBF from data stored in file formats that FoxPro cannot read.
A new table/.DBF is created with the same name as the file the data is imported from. A .DBF extension is assigned to the newly created table/.DBF.
Clauses
<file>
<file> is the name of the file to import data from. If you don't include an extension with the file name, the default extension for the specified file type is assumed.
TYPE
The key word TYPE is optional, but you must include one of the following file types described below.
PDOX
Include PDOX to import Paradox files. Database files in Paradox versions 3.5 and 4.0 by Borland can be imported by including the PDOX option.
XLS
Include XLS to import data from Microsoft Excel spreadsheets versions 2.0, 3.0 and 4.0. Columns from the spreadsheet become fields in the table/.DBF, and the spreadsheet rows become records in the table/.DBF. Spreadsheet files created in Microsoft Excel have an .XLS extension.
The format of COPY is:
COPY TO <file>
[FIELDS <field list>]
[<scope>]
[FOR <expL1>]
[WHILE <expL2>]
[[WITH] CDX] | [[WITH] PRODUCTION]
[NOOPTIMIZE]
[[TYPE] [FOXPLUS | DIF | MOD | SDF | SYLK| WK1 | WKS | WR1 | WRK | XLS |
DELIMITED [WITH <delimiter> WITH BLANK | WITH TAB]]]
Remarks
If an index order is set, records are copied in master index order.
Clauses
<file>
The name of the new file to which COPY TO copies data is specified with <file>. If you do not include an extension with the file name, the default extension for the specified file type is assigned. If you do not specify a file type, COPY TO creates a new table/.DBF and assigns the table/.DBF file name the default extension .DBF.
FIELDS <field list>
If you include FIELDS and a field list, you can specify which fields are copied to the new file. If the FIELDS clause is omitted, all fields are copied to the file. If the file you are creating is not a database, memo fields aren't copied to the new file even if memo field names are included in the field list.