The import spreadsheet tool imports comma-separated value
(CSV) and tab separated value (TSV) files that have been created with
packages such as Microsoft Excel
or Microsoft Access.
About this task
In CSV files and TSV files, the rows and columns of the spreadsheet
or database table are stored as lines of text. Typically, each line
represents a row in the spreadsheet or database, and contains data
from each column. Each data item in a line is separated by a comma,
or a tab, depending on the type of the file. Strings that contain
new line characters are enclosed in quotation marks.
When a spreadsheet
is imported into a module, an object is created for each line of data
in the file. You can use an attribute list or column labels to assign
data in the file to attribute values in the module. If the attributes
do not exist, the tool creates them. The attribute types are normally
derived from the type of data found in the columns. Alternatively,
you can choose the type you want from a list of defined types.
Data items in a CSV or TSV file can have integer, real,
date, or string values. Strings are typically contained within quotation
marks, and can contain commas, tabs, and line breaks. Quotation marks
can be imported if they are duplicated. For example, looking at the
CSV file with a text editor, the string: "This string has a comma,
which is not imported and a quotation mark "" too" is imported
as: This string has a comma which is not imported and a quotation
mark " too .