Function File: [status] = dbfwrite (fname, data)

Write data in a cell array to a dbf (xBase) file, provisionally dBase III+.

fname must be a valid file name, optionally with ’.dbf’ suffix. data should be a cell array of which the top row contains column names (character strings, each max. 10 characters; longer column names will be truncated). Each column must contain only one class of data, except of course the top entry (the column header). Integers interspersed in double type colums will be written as doubles. Data types that can be written are character (text string), numeric (integer and float, the latter with 6 decimal places), and logical.

Output argument status is 1 if the file was written successfully, -1 if one or more data columns were skipped, 0 otherwise. If 0 the incomplete file will be deleted as well.

Provisionally only dBase v. III+ files without memos can be written.

See also: dbfread.

Package: io