Cmdlet
Import-OfficeExcelDelimitedText
Imports normalized CSV/TSV text into an Excel workbook through OfficeIMO.
Syntax
Import-OfficeExcelDelimitedText [-CultureName <String>] [-Delimiter <Char>] [-NoHeader] [-NoTable] [-NoTypeConversion] [-PassThru] [-Path] <String> [-SheetName <String>] [-SkipRows <Int32>] -SourcePath <String> [<CommonParameters>]#Parameter set:
PathImport-OfficeExcelDelimitedText [-CultureName <String>] [-Delimiter <Char>] -Document <ExcelDocument> [-NoHeader] [-NoTable] [-NoTypeConversion] [-PassThru] [-SheetName <String>] [-SkipRows <Int32>] -SourcePath <String> [<CommonParameters>]#Parameter set:
DocumentExamples
Import a semicolon-delimited regional export as a typed worksheet table.
$result = Import-OfficeExcelDelimitedText -Path .\Report.xlsx `
-SourcePath .\sales-pl.csv `
-Delimiter ';' `
-CultureName 'pl-PL' `
-SheetName Sales `
-PassThru
$result | Format-List SheetName,Range,RowCount,ColumnCount,DelimiterNormalizes delimited text through OfficeIMO, performs culture-aware value conversion, and writes the result as an Excel table unless -NoTable is used.
Parameters
- -CultureName String
- Culture name for number and date conversion.
- -Delimiter Char
- Delimiter character. When omitted, it is detected.
- -NoHeader SwitchParameter
- Treat the first row as data.
- -NoTable SwitchParameter
- Import rows without creating an Excel table.
- -NoTypeConversion SwitchParameter
- Keep imported values as text.
- -PassThru SwitchParameter
- Emit a result object.
- -Path String
- Workbook path.
- -SheetName String
- Worksheet name to create or inspect.
- -SkipRows Int32
- Number of parsed delimited records to skip before header discovery or data import.
- -SourcePath String
- Delimited text source path.
- -Document ExcelDocument
- Workbook document.
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.