Cmdlets for CSV

Build 24.0.9060

IncludeColumnHeaders Parameter (Connect-CSV Cmdlet)

Whether to get column names from the first line of the specified files.

Syntax

Connect-CSV -IncludeColumnHeaders bool

Data Type

bool

Default Value

true

Remarks

When this property is set to True, the cmdlet will derive column names for each table from the first row of each file. When this property is set to False, column names are simply the column numbers; that is, if column names have not been defined in Schema.ini.

As with Microsoft Jet OLE DB 4.0, this property can also be specified in ExtendedProperties. The IncludeColumnHeaders value specified in ExtendedProperties overrides this property.

The following connection string parses .csv and .log files as CSV without headers:

DataSource=C:\mycsvlogs;IncludeColumnHeaders=False;Include Files='CSV,LOG'

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060