API Reference

Cmdlet

Get-OfficeCsv

Namespace PSWriteOffice
Inputs
System.String[]
Outputs
OfficeIMO.CSV.CsvDocument

Loads a CSV document from disk or parses CSV text.

Remarks

Returns an CsvDocument for inspection or further transformations.

Examples

Authored help example

Load a CSV file.

PS>


$csv = Get-OfficeCsv -Path .\data.csv
        

Loads the CSV file into an OfficeIMO CsvDocument.

Parse CSV text with a custom delimiter.

PS>


$csv = Get-OfficeCsv -Text \"Name;Total`nAlpha;10\" -Delimiter ';'
        

Parses a semicolon-delimited CSV string into a document.

Inspect headers as a schema hint.

PS>


$csv = Get-OfficeCsv -Path .\data.csv; $csv.Header
        

Returns the header list so you can verify the expected column names.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Get-OfficeCsv [-AllowEmptyLines] [-CollectParseErrors] [-ColumnCountMismatchPolicy <Strict|PadMissingFieldsAndIgnoreExtraFields>] [-CommentCharacter <Char>] [-CompressionType <Auto|GZip|Deflate|Brotli|ZLib>] [-Culture <CultureInfo>] [-DateTimeFormats <String[]>] [-Delimiter <Char>] [-DelimiterText <String>] [-DuplicateHeaderBehavior <Preserve|Rename|Throw>] [-Encoding <Encoding>] [-Header <String[]>] [-InternStrings] [-MaxDecompressedBytes <Int64>] [-MaxFieldLength <Int32>] [-MaxParseErrors <Int32>] [-MaxQuotedFieldLength <Int32>] [-NoHeader] [-NormalizeQuotes] [-NullValue <String>] [-ParseErrorAction <Throw|SkipRow>] -Path <String[]> [-ProgressInterval <Int32>] [-QuoteParsingMode <Lenient|Strict>] [-RecognizeW3CFieldsHeader <Boolean>] [-SkipCommentRows] [-SkipCommentRowsBeforeHeader <Boolean>] [-SkipRows <Int32>] [-StaticColumns <IDictionary>] [-TrimWhitespace <Boolean>] [<CommonParameters>]
#
Parameter set: PathDelimiter

Parameters

AllowEmptyLines SwitchParameter optionalposition: namedpipeline: False
Allow empty lines in the input.
CollectParseErrors SwitchParameter optionalposition: namedpipeline: False
Collect parse errors and write them as non-terminating errors after each input.
ColumnCountMismatchPolicy CsvColumnCountMismatchPolicy optionalposition: namedpipeline: Falsevalues: 2
Controls how rows with fewer or more fields than the header are handled.
Possible values: Strict, PadMissingFieldsAndIgnoreExtraFields
CommentCharacter Char optionalposition: namedpipeline: False
Character that identifies comment rows.
CompressionType CsvCompressionType optionalposition: namedpipeline: Falsevalues: 5
Compression used when reading files. Auto infers from the file extension.
Possible values: Auto, GZip, Deflate, Brotli, ZLib
Culture CultureInfo optionalposition: namedpipeline: False
Culture used for type conversions.
DateTimeFormats String[] optionalposition: namedpipeline: False
Additional date/time formats used by typed conversions and validation.
Delimiter Char optionalposition: namedpipeline: False
Field delimiter character.
DelimiterText String optionalposition: namedpipeline: False
Field delimiter text for multi-character delimiters such as || or ::.
DuplicateHeaderBehavior CsvDuplicateHeaderBehavior optionalposition: namedpipeline: Falsevalues: 3
Controls how duplicate header names are handled.
Possible values: Preserve, Rename, Throw
Encoding Encoding optionalposition: namedpipeline: False
Encoding used when reading the file.
Header String[] optionalposition: namedpipeline: False
Explicit header names to use; when provided, the first CSV record is treated as data.
InternStrings SwitchParameter optionalposition: namedpipeline: False
Reuse repeated string values through a per-read cache.
MaxDecompressedBytes Int64 optionalposition: namedpipeline: False
Maximum decompressed bytes to read from compressed CSV files.
MaxFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for any parsed field.
MaxParseErrors Int32 optionalposition: namedpipeline: False
Maximum number of collected parse errors before parsing fails.
MaxQuotedFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for fields parsed from quoted records.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Treat the first record as data and generate default column names.
NormalizeQuotes SwitchParameter optionalposition: namedpipeline: False
Normalize curly quote characters to straight quotes.
NullValue String optionalposition: namedpipeline: False
Token that is materialized as null when loading rows.
ParseErrorAction CsvParseErrorAction optionalposition: namedpipeline: Falsevalues: 2
How parse errors are handled.
Possible values: Throw, SkipRow
Path String[] requiredposition: 0pipeline: True (ByValue, ByPropertyName)aliases: FilePath, InputPath
Path to one or more CSV files. Wildcards are supported.
ProgressInterval Int32 optionalposition: namedpipeline: False
Report progress every N parsed records.
QuoteParsingMode CsvQuoteParsingMode optionalposition: namedpipeline: Falsevalues: 2
Controls whether malformed quoted fields are parsed leniently or rejected.
Possible values: Lenient, Strict
RecognizeW3CFieldsHeader Boolean optionalposition: namedpipeline: False
Recognize W3C Extended Log File Format #Fields: rows as headers.
SkipCommentRows SwitchParameter optionalposition: namedpipeline: False
Skip comment rows throughout the file.
SkipCommentRowsBeforeHeader Boolean optionalposition: namedpipeline: False
Skip comment rows starting with # while discovering the header.
SkipRows Int32 optionalposition: namedpipeline: False
Number of parsed CSV records to skip before header discovery or data output.
StaticColumns IDictionary optionalposition: namedpipeline: False
Static columns appended to every loaded row.
TrimWhitespace Boolean optionalposition: namedpipeline: False
Trim whitespace around unquoted fields.

Outputs

OfficeIMO.CSV.CsvDocument

Get-OfficeCsv [-AllowEmptyLines] [-CollectParseErrors] [-ColumnCountMismatchPolicy <Strict|PadMissingFieldsAndIgnoreExtraFields>] [-CommentCharacter <Char>] [-CompressionType <Auto|GZip|Deflate|Brotli|ZLib>] [-Culture <CultureInfo>] [-DateTimeFormats <String[]>] [-DuplicateHeaderBehavior <Preserve|Rename|Throw>] [-Encoding <Encoding>] [-Header <String[]>] [-InternStrings] [-MaxDecompressedBytes <Int64>] [-MaxFieldLength <Int32>] [-MaxParseErrors <Int32>] [-MaxQuotedFieldLength <Int32>] [-NoHeader] [-NormalizeQuotes] [-NullValue <String>] [-ParseErrorAction <Throw|SkipRow>] -Path <String[]> [-ProgressInterval <Int32>] [-QuoteParsingMode <Lenient|Strict>] [-RecognizeW3CFieldsHeader <Boolean>] [-SkipCommentRows] [-SkipCommentRowsBeforeHeader <Boolean>] [-SkipRows <Int32>] [-StaticColumns <IDictionary>] [-TrimWhitespace <Boolean>] -UseCulture [<CommonParameters>]
#
Parameter set: PathCulture

Parameters

AllowEmptyLines SwitchParameter optionalposition: namedpipeline: False
Allow empty lines in the input.
CollectParseErrors SwitchParameter optionalposition: namedpipeline: False
Collect parse errors and write them as non-terminating errors after each input.
ColumnCountMismatchPolicy CsvColumnCountMismatchPolicy optionalposition: namedpipeline: Falsevalues: 2
Controls how rows with fewer or more fields than the header are handled.
Possible values: Strict, PadMissingFieldsAndIgnoreExtraFields
CommentCharacter Char optionalposition: namedpipeline: False
Character that identifies comment rows.
CompressionType CsvCompressionType optionalposition: namedpipeline: Falsevalues: 5
Compression used when reading files. Auto infers from the file extension.
Possible values: Auto, GZip, Deflate, Brotli, ZLib
Culture CultureInfo optionalposition: namedpipeline: False
Culture used for type conversions.
DateTimeFormats String[] optionalposition: namedpipeline: False
Additional date/time formats used by typed conversions and validation.
DuplicateHeaderBehavior CsvDuplicateHeaderBehavior optionalposition: namedpipeline: Falsevalues: 3
Controls how duplicate header names are handled.
Possible values: Preserve, Rename, Throw
Encoding Encoding optionalposition: namedpipeline: False
Encoding used when reading the file.
Header String[] optionalposition: namedpipeline: False
Explicit header names to use; when provided, the first CSV record is treated as data.
InternStrings SwitchParameter optionalposition: namedpipeline: False
Reuse repeated string values through a per-read cache.
MaxDecompressedBytes Int64 optionalposition: namedpipeline: False
Maximum decompressed bytes to read from compressed CSV files.
MaxFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for any parsed field.
MaxParseErrors Int32 optionalposition: namedpipeline: False
Maximum number of collected parse errors before parsing fails.
MaxQuotedFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for fields parsed from quoted records.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Treat the first record as data and generate default column names.
NormalizeQuotes SwitchParameter optionalposition: namedpipeline: False
Normalize curly quote characters to straight quotes.
NullValue String optionalposition: namedpipeline: False
Token that is materialized as null when loading rows.
ParseErrorAction CsvParseErrorAction optionalposition: namedpipeline: Falsevalues: 2
How parse errors are handled.
Possible values: Throw, SkipRow
Path String[] requiredposition: 0pipeline: True (ByValue, ByPropertyName)aliases: FilePath, InputPath
Path to one or more CSV files. Wildcards are supported.
ProgressInterval Int32 optionalposition: namedpipeline: False
Report progress every N parsed records.
QuoteParsingMode CsvQuoteParsingMode optionalposition: namedpipeline: Falsevalues: 2
Controls whether malformed quoted fields are parsed leniently or rejected.
Possible values: Lenient, Strict
RecognizeW3CFieldsHeader Boolean optionalposition: namedpipeline: False
Recognize W3C Extended Log File Format #Fields: rows as headers.
SkipCommentRows SwitchParameter optionalposition: namedpipeline: False
Skip comment rows throughout the file.
SkipCommentRowsBeforeHeader Boolean optionalposition: namedpipeline: False
Skip comment rows starting with # while discovering the header.
SkipRows Int32 optionalposition: namedpipeline: False
Number of parsed CSV records to skip before header discovery or data output.
StaticColumns IDictionary optionalposition: namedpipeline: False
Static columns appended to every loaded row.
TrimWhitespace Boolean optionalposition: namedpipeline: False
Trim whitespace around unquoted fields.
UseCulture SwitchParameter requiredposition: namedpipeline: False
Use the list separator from the selected or current culture as the delimiter.

Outputs

OfficeIMO.CSV.CsvDocument

Get-OfficeCsv [-AllowEmptyLines] [-CollectParseErrors] [-ColumnCountMismatchPolicy <Strict|PadMissingFieldsAndIgnoreExtraFields>] [-CommentCharacter <Char>] [-CompressionType <Auto|GZip|Deflate|Brotli|ZLib>] [-Culture <CultureInfo>] [-DateTimeFormats <String[]>] [-DelimiterCandidates <Char[]>] -DetectDelimiter [-DuplicateHeaderBehavior <Preserve|Rename|Throw>] [-Encoding <Encoding>] [-Header <String[]>] [-InternStrings] [-MaxDecompressedBytes <Int64>] [-MaxFieldLength <Int32>] [-MaxParseErrors <Int32>] [-MaxQuotedFieldLength <Int32>] [-NoHeader] [-NormalizeQuotes] [-NullValue <String>] [-ParseErrorAction <Throw|SkipRow>] -Path <String[]> [-ProgressInterval <Int32>] [-QuoteParsingMode <Lenient|Strict>] [-RecognizeW3CFieldsHeader <Boolean>] [-SkipCommentRows] [-SkipCommentRowsBeforeHeader <Boolean>] [-SkipRows <Int32>] [-StaticColumns <IDictionary>] [-TrimWhitespace <Boolean>] [<CommonParameters>]
#
Parameter set: PathDetect

Parameters

AllowEmptyLines SwitchParameter optionalposition: namedpipeline: False
Allow empty lines in the input.
CollectParseErrors SwitchParameter optionalposition: namedpipeline: False
Collect parse errors and write them as non-terminating errors after each input.
ColumnCountMismatchPolicy CsvColumnCountMismatchPolicy optionalposition: namedpipeline: Falsevalues: 2
Controls how rows with fewer or more fields than the header are handled.
Possible values: Strict, PadMissingFieldsAndIgnoreExtraFields
CommentCharacter Char optionalposition: namedpipeline: False
Character that identifies comment rows.
CompressionType CsvCompressionType optionalposition: namedpipeline: Falsevalues: 5
Compression used when reading files. Auto infers from the file extension.
Possible values: Auto, GZip, Deflate, Brotli, ZLib
Culture CultureInfo optionalposition: namedpipeline: False
Culture used for type conversions.
DateTimeFormats String[] optionalposition: namedpipeline: False
Additional date/time formats used by typed conversions and validation.
DelimiterCandidates Char[] optionalposition: namedpipeline: False
Delimiter candidates to consider when detecting the delimiter.
DetectDelimiter SwitchParameter requiredposition: namedpipeline: False
Detect the delimiter from the first meaningful records.
DuplicateHeaderBehavior CsvDuplicateHeaderBehavior optionalposition: namedpipeline: Falsevalues: 3
Controls how duplicate header names are handled.
Possible values: Preserve, Rename, Throw
Encoding Encoding optionalposition: namedpipeline: False
Encoding used when reading the file.
Header String[] optionalposition: namedpipeline: False
Explicit header names to use; when provided, the first CSV record is treated as data.
InternStrings SwitchParameter optionalposition: namedpipeline: False
Reuse repeated string values through a per-read cache.
MaxDecompressedBytes Int64 optionalposition: namedpipeline: False
Maximum decompressed bytes to read from compressed CSV files.
MaxFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for any parsed field.
MaxParseErrors Int32 optionalposition: namedpipeline: False
Maximum number of collected parse errors before parsing fails.
MaxQuotedFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for fields parsed from quoted records.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Treat the first record as data and generate default column names.
NormalizeQuotes SwitchParameter optionalposition: namedpipeline: False
Normalize curly quote characters to straight quotes.
NullValue String optionalposition: namedpipeline: False
Token that is materialized as null when loading rows.
ParseErrorAction CsvParseErrorAction optionalposition: namedpipeline: Falsevalues: 2
How parse errors are handled.
Possible values: Throw, SkipRow
Path String[] requiredposition: 0pipeline: True (ByValue, ByPropertyName)aliases: FilePath, InputPath
Path to one or more CSV files. Wildcards are supported.
ProgressInterval Int32 optionalposition: namedpipeline: False
Report progress every N parsed records.
QuoteParsingMode CsvQuoteParsingMode optionalposition: namedpipeline: Falsevalues: 2
Controls whether malformed quoted fields are parsed leniently or rejected.
Possible values: Lenient, Strict
RecognizeW3CFieldsHeader Boolean optionalposition: namedpipeline: False
Recognize W3C Extended Log File Format #Fields: rows as headers.
SkipCommentRows SwitchParameter optionalposition: namedpipeline: False
Skip comment rows throughout the file.
SkipCommentRowsBeforeHeader Boolean optionalposition: namedpipeline: False
Skip comment rows starting with # while discovering the header.
SkipRows Int32 optionalposition: namedpipeline: False
Number of parsed CSV records to skip before header discovery or data output.
StaticColumns IDictionary optionalposition: namedpipeline: False
Static columns appended to every loaded row.
TrimWhitespace Boolean optionalposition: namedpipeline: False
Trim whitespace around unquoted fields.

Outputs

OfficeIMO.CSV.CsvDocument

Get-OfficeCsv [-AllowEmptyLines] [-CollectParseErrors] [-ColumnCountMismatchPolicy <Strict|PadMissingFieldsAndIgnoreExtraFields>] [-CommentCharacter <Char>] [-CompressionType <Auto|GZip|Deflate|Brotli|ZLib>] [-Culture <CultureInfo>] [-DateTimeFormats <String[]>] [-Delimiter <Char>] [-DelimiterText <String>] [-DuplicateHeaderBehavior <Preserve|Rename|Throw>] [-Encoding <Encoding>] [-Header <String[]>] [-InternStrings] -LiteralPath <String[]> [-MaxDecompressedBytes <Int64>] [-MaxFieldLength <Int32>] [-MaxParseErrors <Int32>] [-MaxQuotedFieldLength <Int32>] [-NoHeader] [-NormalizeQuotes] [-NullValue <String>] [-ParseErrorAction <Throw|SkipRow>] [-ProgressInterval <Int32>] [-QuoteParsingMode <Lenient|Strict>] [-RecognizeW3CFieldsHeader <Boolean>] [-SkipCommentRows] [-SkipCommentRowsBeforeHeader <Boolean>] [-SkipRows <Int32>] [-StaticColumns <IDictionary>] [-TrimWhitespace <Boolean>] [<CommonParameters>]
#
Parameter set: LiteralPathDelimiter

Parameters

AllowEmptyLines SwitchParameter optionalposition: namedpipeline: False
Allow empty lines in the input.
CollectParseErrors SwitchParameter optionalposition: namedpipeline: False
Collect parse errors and write them as non-terminating errors after each input.
ColumnCountMismatchPolicy CsvColumnCountMismatchPolicy optionalposition: namedpipeline: Falsevalues: 2
Controls how rows with fewer or more fields than the header are handled.
Possible values: Strict, PadMissingFieldsAndIgnoreExtraFields
CommentCharacter Char optionalposition: namedpipeline: False
Character that identifies comment rows.
CompressionType CsvCompressionType optionalposition: namedpipeline: Falsevalues: 5
Compression used when reading files. Auto infers from the file extension.
Possible values: Auto, GZip, Deflate, Brotli, ZLib
Culture CultureInfo optionalposition: namedpipeline: False
Culture used for type conversions.
DateTimeFormats String[] optionalposition: namedpipeline: False
Additional date/time formats used by typed conversions and validation.
Delimiter Char optionalposition: namedpipeline: False
Field delimiter character.
DelimiterText String optionalposition: namedpipeline: False
Field delimiter text for multi-character delimiters such as || or ::.
DuplicateHeaderBehavior CsvDuplicateHeaderBehavior optionalposition: namedpipeline: Falsevalues: 3
Controls how duplicate header names are handled.
Possible values: Preserve, Rename, Throw
Encoding Encoding optionalposition: namedpipeline: False
Encoding used when reading the file.
Header String[] optionalposition: namedpipeline: False
Explicit header names to use; when provided, the first CSV record is treated as data.
InternStrings SwitchParameter optionalposition: namedpipeline: False
Reuse repeated string values through a per-read cache.
LiteralPath String[] requiredposition: namedpipeline: True (ByPropertyName)aliases: LP, PSPath
Literal path to one or more CSV files.
MaxDecompressedBytes Int64 optionalposition: namedpipeline: False
Maximum decompressed bytes to read from compressed CSV files.
MaxFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for any parsed field.
MaxParseErrors Int32 optionalposition: namedpipeline: False
Maximum number of collected parse errors before parsing fails.
MaxQuotedFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for fields parsed from quoted records.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Treat the first record as data and generate default column names.
NormalizeQuotes SwitchParameter optionalposition: namedpipeline: False
Normalize curly quote characters to straight quotes.
NullValue String optionalposition: namedpipeline: False
Token that is materialized as null when loading rows.
ParseErrorAction CsvParseErrorAction optionalposition: namedpipeline: Falsevalues: 2
How parse errors are handled.
Possible values: Throw, SkipRow
ProgressInterval Int32 optionalposition: namedpipeline: False
Report progress every N parsed records.
QuoteParsingMode CsvQuoteParsingMode optionalposition: namedpipeline: Falsevalues: 2
Controls whether malformed quoted fields are parsed leniently or rejected.
Possible values: Lenient, Strict
RecognizeW3CFieldsHeader Boolean optionalposition: namedpipeline: False
Recognize W3C Extended Log File Format #Fields: rows as headers.
SkipCommentRows SwitchParameter optionalposition: namedpipeline: False
Skip comment rows throughout the file.
SkipCommentRowsBeforeHeader Boolean optionalposition: namedpipeline: False
Skip comment rows starting with # while discovering the header.
SkipRows Int32 optionalposition: namedpipeline: False
Number of parsed CSV records to skip before header discovery or data output.
StaticColumns IDictionary optionalposition: namedpipeline: False
Static columns appended to every loaded row.
TrimWhitespace Boolean optionalposition: namedpipeline: False
Trim whitespace around unquoted fields.

Outputs

OfficeIMO.CSV.CsvDocument

Get-OfficeCsv [-AllowEmptyLines] [-CollectParseErrors] [-ColumnCountMismatchPolicy <Strict|PadMissingFieldsAndIgnoreExtraFields>] [-CommentCharacter <Char>] [-CompressionType <Auto|GZip|Deflate|Brotli|ZLib>] [-Culture <CultureInfo>] [-DateTimeFormats <String[]>] [-DuplicateHeaderBehavior <Preserve|Rename|Throw>] [-Encoding <Encoding>] [-Header <String[]>] [-InternStrings] -LiteralPath <String[]> [-MaxDecompressedBytes <Int64>] [-MaxFieldLength <Int32>] [-MaxParseErrors <Int32>] [-MaxQuotedFieldLength <Int32>] [-NoHeader] [-NormalizeQuotes] [-NullValue <String>] [-ParseErrorAction <Throw|SkipRow>] [-ProgressInterval <Int32>] [-QuoteParsingMode <Lenient|Strict>] [-RecognizeW3CFieldsHeader <Boolean>] [-SkipCommentRows] [-SkipCommentRowsBeforeHeader <Boolean>] [-SkipRows <Int32>] [-StaticColumns <IDictionary>] [-TrimWhitespace <Boolean>] -UseCulture [<CommonParameters>]
#
Parameter set: LiteralPathCulture

Parameters

AllowEmptyLines SwitchParameter optionalposition: namedpipeline: False
Allow empty lines in the input.
CollectParseErrors SwitchParameter optionalposition: namedpipeline: False
Collect parse errors and write them as non-terminating errors after each input.
ColumnCountMismatchPolicy CsvColumnCountMismatchPolicy optionalposition: namedpipeline: Falsevalues: 2
Controls how rows with fewer or more fields than the header are handled.
Possible values: Strict, PadMissingFieldsAndIgnoreExtraFields
CommentCharacter Char optionalposition: namedpipeline: False
Character that identifies comment rows.
CompressionType CsvCompressionType optionalposition: namedpipeline: Falsevalues: 5
Compression used when reading files. Auto infers from the file extension.
Possible values: Auto, GZip, Deflate, Brotli, ZLib
Culture CultureInfo optionalposition: namedpipeline: False
Culture used for type conversions.
DateTimeFormats String[] optionalposition: namedpipeline: False
Additional date/time formats used by typed conversions and validation.
DuplicateHeaderBehavior CsvDuplicateHeaderBehavior optionalposition: namedpipeline: Falsevalues: 3
Controls how duplicate header names are handled.
Possible values: Preserve, Rename, Throw
Encoding Encoding optionalposition: namedpipeline: False
Encoding used when reading the file.
Header String[] optionalposition: namedpipeline: False
Explicit header names to use; when provided, the first CSV record is treated as data.
InternStrings SwitchParameter optionalposition: namedpipeline: False
Reuse repeated string values through a per-read cache.
LiteralPath String[] requiredposition: namedpipeline: True (ByPropertyName)aliases: LP, PSPath
Literal path to one or more CSV files.
MaxDecompressedBytes Int64 optionalposition: namedpipeline: False
Maximum decompressed bytes to read from compressed CSV files.
MaxFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for any parsed field.
MaxParseErrors Int32 optionalposition: namedpipeline: False
Maximum number of collected parse errors before parsing fails.
MaxQuotedFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for fields parsed from quoted records.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Treat the first record as data and generate default column names.
NormalizeQuotes SwitchParameter optionalposition: namedpipeline: False
Normalize curly quote characters to straight quotes.
NullValue String optionalposition: namedpipeline: False
Token that is materialized as null when loading rows.
ParseErrorAction CsvParseErrorAction optionalposition: namedpipeline: Falsevalues: 2
How parse errors are handled.
Possible values: Throw, SkipRow
ProgressInterval Int32 optionalposition: namedpipeline: False
Report progress every N parsed records.
QuoteParsingMode CsvQuoteParsingMode optionalposition: namedpipeline: Falsevalues: 2
Controls whether malformed quoted fields are parsed leniently or rejected.
Possible values: Lenient, Strict
RecognizeW3CFieldsHeader Boolean optionalposition: namedpipeline: False
Recognize W3C Extended Log File Format #Fields: rows as headers.
SkipCommentRows SwitchParameter optionalposition: namedpipeline: False
Skip comment rows throughout the file.
SkipCommentRowsBeforeHeader Boolean optionalposition: namedpipeline: False
Skip comment rows starting with # while discovering the header.
SkipRows Int32 optionalposition: namedpipeline: False
Number of parsed CSV records to skip before header discovery or data output.
StaticColumns IDictionary optionalposition: namedpipeline: False
Static columns appended to every loaded row.
TrimWhitespace Boolean optionalposition: namedpipeline: False
Trim whitespace around unquoted fields.
UseCulture SwitchParameter requiredposition: namedpipeline: False
Use the list separator from the selected or current culture as the delimiter.

Outputs

OfficeIMO.CSV.CsvDocument

Get-OfficeCsv [-AllowEmptyLines] [-CollectParseErrors] [-ColumnCountMismatchPolicy <Strict|PadMissingFieldsAndIgnoreExtraFields>] [-CommentCharacter <Char>] [-CompressionType <Auto|GZip|Deflate|Brotli|ZLib>] [-Culture <CultureInfo>] [-DateTimeFormats <String[]>] [-DelimiterCandidates <Char[]>] -DetectDelimiter [-DuplicateHeaderBehavior <Preserve|Rename|Throw>] [-Encoding <Encoding>] [-Header <String[]>] [-InternStrings] -LiteralPath <String[]> [-MaxDecompressedBytes <Int64>] [-MaxFieldLength <Int32>] [-MaxParseErrors <Int32>] [-MaxQuotedFieldLength <Int32>] [-NoHeader] [-NormalizeQuotes] [-NullValue <String>] [-ParseErrorAction <Throw|SkipRow>] [-ProgressInterval <Int32>] [-QuoteParsingMode <Lenient|Strict>] [-RecognizeW3CFieldsHeader <Boolean>] [-SkipCommentRows] [-SkipCommentRowsBeforeHeader <Boolean>] [-SkipRows <Int32>] [-StaticColumns <IDictionary>] [-TrimWhitespace <Boolean>] [<CommonParameters>]
#
Parameter set: LiteralPathDetect

Parameters

AllowEmptyLines SwitchParameter optionalposition: namedpipeline: False
Allow empty lines in the input.
CollectParseErrors SwitchParameter optionalposition: namedpipeline: False
Collect parse errors and write them as non-terminating errors after each input.
ColumnCountMismatchPolicy CsvColumnCountMismatchPolicy optionalposition: namedpipeline: Falsevalues: 2
Controls how rows with fewer or more fields than the header are handled.
Possible values: Strict, PadMissingFieldsAndIgnoreExtraFields
CommentCharacter Char optionalposition: namedpipeline: False
Character that identifies comment rows.
CompressionType CsvCompressionType optionalposition: namedpipeline: Falsevalues: 5
Compression used when reading files. Auto infers from the file extension.
Possible values: Auto, GZip, Deflate, Brotli, ZLib
Culture CultureInfo optionalposition: namedpipeline: False
Culture used for type conversions.
DateTimeFormats String[] optionalposition: namedpipeline: False
Additional date/time formats used by typed conversions and validation.
DelimiterCandidates Char[] optionalposition: namedpipeline: False
Delimiter candidates to consider when detecting the delimiter.
DetectDelimiter SwitchParameter requiredposition: namedpipeline: False
Detect the delimiter from the first meaningful records.
DuplicateHeaderBehavior CsvDuplicateHeaderBehavior optionalposition: namedpipeline: Falsevalues: 3
Controls how duplicate header names are handled.
Possible values: Preserve, Rename, Throw
Encoding Encoding optionalposition: namedpipeline: False
Encoding used when reading the file.
Header String[] optionalposition: namedpipeline: False
Explicit header names to use; when provided, the first CSV record is treated as data.
InternStrings SwitchParameter optionalposition: namedpipeline: False
Reuse repeated string values through a per-read cache.
LiteralPath String[] requiredposition: namedpipeline: True (ByPropertyName)aliases: LP, PSPath
Literal path to one or more CSV files.
MaxDecompressedBytes Int64 optionalposition: namedpipeline: False
Maximum decompressed bytes to read from compressed CSV files.
MaxFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for any parsed field.
MaxParseErrors Int32 optionalposition: namedpipeline: False
Maximum number of collected parse errors before parsing fails.
MaxQuotedFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for fields parsed from quoted records.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Treat the first record as data and generate default column names.
NormalizeQuotes SwitchParameter optionalposition: namedpipeline: False
Normalize curly quote characters to straight quotes.
NullValue String optionalposition: namedpipeline: False
Token that is materialized as null when loading rows.
ParseErrorAction CsvParseErrorAction optionalposition: namedpipeline: Falsevalues: 2
How parse errors are handled.
Possible values: Throw, SkipRow
ProgressInterval Int32 optionalposition: namedpipeline: False
Report progress every N parsed records.
QuoteParsingMode CsvQuoteParsingMode optionalposition: namedpipeline: Falsevalues: 2
Controls whether malformed quoted fields are parsed leniently or rejected.
Possible values: Lenient, Strict
RecognizeW3CFieldsHeader Boolean optionalposition: namedpipeline: False
Recognize W3C Extended Log File Format #Fields: rows as headers.
SkipCommentRows SwitchParameter optionalposition: namedpipeline: False
Skip comment rows throughout the file.
SkipCommentRowsBeforeHeader Boolean optionalposition: namedpipeline: False
Skip comment rows starting with # while discovering the header.
SkipRows Int32 optionalposition: namedpipeline: False
Number of parsed CSV records to skip before header discovery or data output.
StaticColumns IDictionary optionalposition: namedpipeline: False
Static columns appended to every loaded row.
TrimWhitespace Boolean optionalposition: namedpipeline: False
Trim whitespace around unquoted fields.

Outputs

OfficeIMO.CSV.CsvDocument

Get-OfficeCsv [-AllowEmptyLines] [-CollectParseErrors] [-ColumnCountMismatchPolicy <Strict|PadMissingFieldsAndIgnoreExtraFields>] [-CommentCharacter <Char>] [-Culture <CultureInfo>] [-DateTimeFormats <String[]>] [-Delimiter <Char>] [-DelimiterText <String>] [-DuplicateHeaderBehavior <Preserve|Rename|Throw>] [-Header <String[]>] [-InternStrings] [-MaxFieldLength <Int32>] [-MaxParseErrors <Int32>] [-MaxQuotedFieldLength <Int32>] [-NoHeader] [-NormalizeQuotes] [-NullValue <String>] [-ParseErrorAction <Throw|SkipRow>] [-ProgressInterval <Int32>] [-QuoteParsingMode <Lenient|Strict>] [-RecognizeW3CFieldsHeader <Boolean>] [-SkipCommentRows] [-SkipCommentRowsBeforeHeader <Boolean>] [-SkipRows <Int32>] [-StaticColumns <IDictionary>] -Text <String> [-TrimWhitespace <Boolean>] [<CommonParameters>]
#
Parameter set: TextDelimiter

Parameters

AllowEmptyLines SwitchParameter optionalposition: namedpipeline: False
Allow empty lines in the input.
CollectParseErrors SwitchParameter optionalposition: namedpipeline: False
Collect parse errors and write them as non-terminating errors after each input.
ColumnCountMismatchPolicy CsvColumnCountMismatchPolicy optionalposition: namedpipeline: Falsevalues: 2
Controls how rows with fewer or more fields than the header are handled.
Possible values: Strict, PadMissingFieldsAndIgnoreExtraFields
CommentCharacter Char optionalposition: namedpipeline: False
Character that identifies comment rows.
Culture CultureInfo optionalposition: namedpipeline: False
Culture used for type conversions.
DateTimeFormats String[] optionalposition: namedpipeline: False
Additional date/time formats used by typed conversions and validation.
Delimiter Char optionalposition: namedpipeline: False
Field delimiter character.
DelimiterText String optionalposition: namedpipeline: False
Field delimiter text for multi-character delimiters such as || or ::.
DuplicateHeaderBehavior CsvDuplicateHeaderBehavior optionalposition: namedpipeline: Falsevalues: 3
Controls how duplicate header names are handled.
Possible values: Preserve, Rename, Throw
Header String[] optionalposition: namedpipeline: False
Explicit header names to use; when provided, the first CSV record is treated as data.
InternStrings SwitchParameter optionalposition: namedpipeline: False
Reuse repeated string values through a per-read cache.
MaxFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for any parsed field.
MaxParseErrors Int32 optionalposition: namedpipeline: False
Maximum number of collected parse errors before parsing fails.
MaxQuotedFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for fields parsed from quoted records.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Treat the first record as data and generate default column names.
NormalizeQuotes SwitchParameter optionalposition: namedpipeline: False
Normalize curly quote characters to straight quotes.
NullValue String optionalposition: namedpipeline: False
Token that is materialized as null when loading rows.
ParseErrorAction CsvParseErrorAction optionalposition: namedpipeline: Falsevalues: 2
How parse errors are handled.
Possible values: Throw, SkipRow
ProgressInterval Int32 optionalposition: namedpipeline: False
Report progress every N parsed records.
QuoteParsingMode CsvQuoteParsingMode optionalposition: namedpipeline: Falsevalues: 2
Controls whether malformed quoted fields are parsed leniently or rejected.
Possible values: Lenient, Strict
RecognizeW3CFieldsHeader Boolean optionalposition: namedpipeline: False
Recognize W3C Extended Log File Format #Fields: rows as headers.
SkipCommentRows SwitchParameter optionalposition: namedpipeline: False
Skip comment rows throughout the file.
SkipCommentRowsBeforeHeader Boolean optionalposition: namedpipeline: False
Skip comment rows starting with # while discovering the header.
SkipRows Int32 optionalposition: namedpipeline: False
Number of parsed CSV records to skip before header discovery or data output.
StaticColumns IDictionary optionalposition: namedpipeline: False
Static columns appended to every loaded row.
Text String requiredposition: namedpipeline: False
CSV text to parse.
TrimWhitespace Boolean optionalposition: namedpipeline: False
Trim whitespace around unquoted fields.

Outputs

OfficeIMO.CSV.CsvDocument

Get-OfficeCsv [-AllowEmptyLines] [-CollectParseErrors] [-ColumnCountMismatchPolicy <Strict|PadMissingFieldsAndIgnoreExtraFields>] [-CommentCharacter <Char>] [-Culture <CultureInfo>] [-DateTimeFormats <String[]>] [-DuplicateHeaderBehavior <Preserve|Rename|Throw>] [-Header <String[]>] [-InternStrings] [-MaxFieldLength <Int32>] [-MaxParseErrors <Int32>] [-MaxQuotedFieldLength <Int32>] [-NoHeader] [-NormalizeQuotes] [-NullValue <String>] [-ParseErrorAction <Throw|SkipRow>] [-ProgressInterval <Int32>] [-QuoteParsingMode <Lenient|Strict>] [-RecognizeW3CFieldsHeader <Boolean>] [-SkipCommentRows] [-SkipCommentRowsBeforeHeader <Boolean>] [-SkipRows <Int32>] [-StaticColumns <IDictionary>] -Text <String> [-TrimWhitespace <Boolean>] -UseCulture [<CommonParameters>]
#
Parameter set: TextCulture

Parameters

AllowEmptyLines SwitchParameter optionalposition: namedpipeline: False
Allow empty lines in the input.
CollectParseErrors SwitchParameter optionalposition: namedpipeline: False
Collect parse errors and write them as non-terminating errors after each input.
ColumnCountMismatchPolicy CsvColumnCountMismatchPolicy optionalposition: namedpipeline: Falsevalues: 2
Controls how rows with fewer or more fields than the header are handled.
Possible values: Strict, PadMissingFieldsAndIgnoreExtraFields
CommentCharacter Char optionalposition: namedpipeline: False
Character that identifies comment rows.
Culture CultureInfo optionalposition: namedpipeline: False
Culture used for type conversions.
DateTimeFormats String[] optionalposition: namedpipeline: False
Additional date/time formats used by typed conversions and validation.
DuplicateHeaderBehavior CsvDuplicateHeaderBehavior optionalposition: namedpipeline: Falsevalues: 3
Controls how duplicate header names are handled.
Possible values: Preserve, Rename, Throw
Header String[] optionalposition: namedpipeline: False
Explicit header names to use; when provided, the first CSV record is treated as data.
InternStrings SwitchParameter optionalposition: namedpipeline: False
Reuse repeated string values through a per-read cache.
MaxFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for any parsed field.
MaxParseErrors Int32 optionalposition: namedpipeline: False
Maximum number of collected parse errors before parsing fails.
MaxQuotedFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for fields parsed from quoted records.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Treat the first record as data and generate default column names.
NormalizeQuotes SwitchParameter optionalposition: namedpipeline: False
Normalize curly quote characters to straight quotes.
NullValue String optionalposition: namedpipeline: False
Token that is materialized as null when loading rows.
ParseErrorAction CsvParseErrorAction optionalposition: namedpipeline: Falsevalues: 2
How parse errors are handled.
Possible values: Throw, SkipRow
ProgressInterval Int32 optionalposition: namedpipeline: False
Report progress every N parsed records.
QuoteParsingMode CsvQuoteParsingMode optionalposition: namedpipeline: Falsevalues: 2
Controls whether malformed quoted fields are parsed leniently or rejected.
Possible values: Lenient, Strict
RecognizeW3CFieldsHeader Boolean optionalposition: namedpipeline: False
Recognize W3C Extended Log File Format #Fields: rows as headers.
SkipCommentRows SwitchParameter optionalposition: namedpipeline: False
Skip comment rows throughout the file.
SkipCommentRowsBeforeHeader Boolean optionalposition: namedpipeline: False
Skip comment rows starting with # while discovering the header.
SkipRows Int32 optionalposition: namedpipeline: False
Number of parsed CSV records to skip before header discovery or data output.
StaticColumns IDictionary optionalposition: namedpipeline: False
Static columns appended to every loaded row.
Text String requiredposition: namedpipeline: False
CSV text to parse.
TrimWhitespace Boolean optionalposition: namedpipeline: False
Trim whitespace around unquoted fields.
UseCulture SwitchParameter requiredposition: namedpipeline: False
Use the list separator from the selected or current culture as the delimiter.

Outputs

OfficeIMO.CSV.CsvDocument

Get-OfficeCsv [-AllowEmptyLines] [-CollectParseErrors] [-ColumnCountMismatchPolicy <Strict|PadMissingFieldsAndIgnoreExtraFields>] [-CommentCharacter <Char>] [-Culture <CultureInfo>] [-DateTimeFormats <String[]>] [-DelimiterCandidates <Char[]>] -DetectDelimiter [-DuplicateHeaderBehavior <Preserve|Rename|Throw>] [-Header <String[]>] [-InternStrings] [-MaxFieldLength <Int32>] [-MaxParseErrors <Int32>] [-MaxQuotedFieldLength <Int32>] [-NoHeader] [-NormalizeQuotes] [-NullValue <String>] [-ParseErrorAction <Throw|SkipRow>] [-ProgressInterval <Int32>] [-QuoteParsingMode <Lenient|Strict>] [-RecognizeW3CFieldsHeader <Boolean>] [-SkipCommentRows] [-SkipCommentRowsBeforeHeader <Boolean>] [-SkipRows <Int32>] [-StaticColumns <IDictionary>] -Text <String> [-TrimWhitespace <Boolean>] [<CommonParameters>]
#
Parameter set: TextDetect

Parameters

AllowEmptyLines SwitchParameter optionalposition: namedpipeline: False
Allow empty lines in the input.
CollectParseErrors SwitchParameter optionalposition: namedpipeline: False
Collect parse errors and write them as non-terminating errors after each input.
ColumnCountMismatchPolicy CsvColumnCountMismatchPolicy optionalposition: namedpipeline: Falsevalues: 2
Controls how rows with fewer or more fields than the header are handled.
Possible values: Strict, PadMissingFieldsAndIgnoreExtraFields
CommentCharacter Char optionalposition: namedpipeline: False
Character that identifies comment rows.
Culture CultureInfo optionalposition: namedpipeline: False
Culture used for type conversions.
DateTimeFormats String[] optionalposition: namedpipeline: False
Additional date/time formats used by typed conversions and validation.
DelimiterCandidates Char[] optionalposition: namedpipeline: False
Delimiter candidates to consider when detecting the delimiter.
DetectDelimiter SwitchParameter requiredposition: namedpipeline: False
Detect the delimiter from the first meaningful records.
DuplicateHeaderBehavior CsvDuplicateHeaderBehavior optionalposition: namedpipeline: Falsevalues: 3
Controls how duplicate header names are handled.
Possible values: Preserve, Rename, Throw
Header String[] optionalposition: namedpipeline: False
Explicit header names to use; when provided, the first CSV record is treated as data.
InternStrings SwitchParameter optionalposition: namedpipeline: False
Reuse repeated string values through a per-read cache.
MaxFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for any parsed field.
MaxParseErrors Int32 optionalposition: namedpipeline: False
Maximum number of collected parse errors before parsing fails.
MaxQuotedFieldLength Int32 optionalposition: namedpipeline: False
Maximum length allowed for fields parsed from quoted records.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Treat the first record as data and generate default column names.
NormalizeQuotes SwitchParameter optionalposition: namedpipeline: False
Normalize curly quote characters to straight quotes.
NullValue String optionalposition: namedpipeline: False
Token that is materialized as null when loading rows.
ParseErrorAction CsvParseErrorAction optionalposition: namedpipeline: Falsevalues: 2
How parse errors are handled.
Possible values: Throw, SkipRow
ProgressInterval Int32 optionalposition: namedpipeline: False
Report progress every N parsed records.
QuoteParsingMode CsvQuoteParsingMode optionalposition: namedpipeline: Falsevalues: 2
Controls whether malformed quoted fields are parsed leniently or rejected.
Possible values: Lenient, Strict
RecognizeW3CFieldsHeader Boolean optionalposition: namedpipeline: False
Recognize W3C Extended Log File Format #Fields: rows as headers.
SkipCommentRows SwitchParameter optionalposition: namedpipeline: False
Skip comment rows throughout the file.
SkipCommentRowsBeforeHeader Boolean optionalposition: namedpipeline: False
Skip comment rows starting with # while discovering the header.
SkipRows Int32 optionalposition: namedpipeline: False
Number of parsed CSV records to skip before header discovery or data output.
StaticColumns IDictionary optionalposition: namedpipeline: False
Static columns appended to every loaded row.
Text String requiredposition: namedpipeline: False
CSV text to parse.
TrimWhitespace Boolean optionalposition: namedpipeline: False
Trim whitespace around unquoted fields.

Outputs

OfficeIMO.CSV.CsvDocument