API Reference

Cmdlet

Import-OfficeExcelDelimitedText

Aliases: ExcelCsvImport, ExcelDelimitedImport
Namespace PSWriteOffice
Aliases
ExcelCsvImport ExcelDelimitedImport
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Management.Automation.PSObject

Imports normalized CSV/TSV text into an Excel workbook through OfficeIMO.

Remarks

Imports normalized CSV/TSV text into an Excel workbook through OfficeIMO.

Examples

Authored help example

Import a semicolon-delimited regional export as a typed worksheet table.

PS>


$result = Import-OfficeExcelDelimitedText -Path .\Report.xlsx `
                -SourcePath .\sales-pl.csv `
                -Delimiter ';' `
                -CultureName 'pl-PL' `
                -SheetName Sales `
                -PassThru
            $result | Format-List SheetName,Range,RowCount,ColumnCount,Delimiter
        

Normalizes delimited text through OfficeIMO, performs culture-aware value conversion, and writes the result as an Excel table unless -NoTable is used.

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

Import-OfficeExcelDelimitedText [-CultureName <String>] [-Delimiter <Nullable`1>] -InputPath <String> [-NoHeader] [-NoTable] [-NoTypeConversion] [-PassThru] [-SheetName <String>] [-SkipRows <Int32>] -SourcePath <String> [<CommonParameters>]
#
Parameter set: Path

Parameters

CultureName String optionalposition: namedpipeline: False
Culture name for number and date conversion.
Delimiter Nullable`1 optionalposition: namedpipeline: False
Delimiter character. When omitted, it is detected.
InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Workbook path.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Treat the first row as data.
NoTable SwitchParameter optionalposition: namedpipeline: False
Import rows without creating an Excel table.
NoTypeConversion SwitchParameter optionalposition: namedpipeline: False
Keep imported values as text.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit a result object.
SheetName String optionalposition: namedpipeline: False
Worksheet name to create or inspect.
SkipRows Int32 optionalposition: namedpipeline: False
Number of parsed delimited records to skip before header discovery or data import.
SourcePath String requiredposition: namedpipeline: False
Delimited text source path.

Outputs

System.Management.Automation.PSObject

Import-OfficeExcelDelimitedText [-CultureName <String>] [-Delimiter <Nullable`1>] -Document <ExcelDocument> [-NoHeader] [-NoTable] [-NoTypeConversion] [-PassThru] [-SheetName <String>] [-SkipRows <Int32>] -SourcePath <String> [<CommonParameters>]
#
Parameter set: Document

Parameters

CultureName String optionalposition: namedpipeline: False
Culture name for number and date conversion.
Delimiter Nullable`1 optionalposition: namedpipeline: False
Delimiter character. When omitted, it is detected.
Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook document.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Treat the first row as data.
NoTable SwitchParameter optionalposition: namedpipeline: False
Import rows without creating an Excel table.
NoTypeConversion SwitchParameter optionalposition: namedpipeline: False
Keep imported values as text.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit a result object.
SheetName String optionalposition: namedpipeline: False
Worksheet name to create or inspect.
SkipRows Int32 optionalposition: namedpipeline: False
Number of parsed delimited records to skip before header discovery or data import.
SourcePath String requiredposition: namedpipeline: False
Delimited text source path.

Outputs

System.Management.Automation.PSObject