Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Import-OfficeExcelDelimitedText

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

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: Path
Import-OfficeExcelDelimitedText [-CultureName <String>] [-Delimiter <Char>] -Document <ExcelDocument> [-NoHeader] [-NoTable] [-NoTypeConversion] [-PassThru] [-SheetName <String>] [-SkipRows <Int32>] -SourcePath <String> [<CommonParameters>]
#
Parameter set: Document

Examples

Authored help example

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,Delimiter

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

Parameters

-CultureName String optional
Culture name for number and date conversion.
-Delimiter Char optional
Delimiter character. When omitted, it is detected.
-NoHeader SwitchParameter optional
Treat the first row as data.
-NoTable SwitchParameter optional
Import rows without creating an Excel table.
-NoTypeConversion SwitchParameter optional
Keep imported values as text.
-PassThru SwitchParameter optional
Emit a result object.
-Path String requiredposition: 0aliases: FilePath, InputPathsets: Path
Workbook path.
-SheetName String optional
Worksheet name to create or inspect.
-SkipRows Int32 optional
Number of parsed delimited records to skip before header discovery or data import.
-SourcePath String required
Delimited text source path.
-Document ExcelDocument requiredpipeline: True (ByValue)sets: Document
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.