Contents Index Topic Contents | ||
Previous Topic: TextQualifier Next Topic: Methods |
UseHeader
Specifies whether the first line of the data file contains header information.
Syntax
dataobj.UseHeader = fValue
fValue Boolean expression that indicates that the data file contains an initial line that names each column and optionally specifies its data type. If fValue is TRUE, the first line of the data file should match the following layout:
fieldname:type, fieldname:type, ...Note that the above assumes the default field and row delimiters (comma and newline, respectively).
Fieldname can be an arbitrary text string, although it is best to avoid spaces and other punctuation characters.
Type can be one of the following types of values:
String Textual data (default) Date Calendar dates (see below for formatting) Boolean Logical data (Yes/No, True/False, 0/not 0) Int Integral numbers (-3, 1, 5) Float Floating point numbers (3.141, 2.77, 0) Date can be optionally followed by a space and then the letters D, M, and Y in any order. These correspond to Day, Month, and Year and control the interpretation of the dates in the data file. The date data is treated as three numbers separated by characters, so the actual separation character is not important.
Boolean will interpret the following data:
True values: Yes, True, 1, -1, any nonzero number False values: No, False, 0 (zero) The decimal separator used by float data is determined by the Language property.
The following sample data file shows how the various data types can be declared when UseHeader is set to TRUE and the default settings for FieldDelim, RowDelim, and Language are used.
FoodItem,Price:Float,Purchased:Date YMD,OnOrder:Boolean,Quantity:Int Bread,1.57,97/5/12,Yes,30 Cheese,3.52,96/2/2,No,5 Old Wine,183.99,1905-1-1,No,1See also DataURL, Language, Reset
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.