# Export-OfficeExcel

Exports PowerShell objects to an Excel workbook using an operator-friendly surface.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`System.Object`

**Source**

[ExportOfficeExcelCommand.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Excel/ExportOfficeExcelCommand.cs#L49) 

Exports PowerShell objects to an Excel workbook using an operator-friendly surface.

## Syntax

```
Export-OfficeExcel
[-Address <String>]
[-CollectionSeparator <String>]
[-ColumnFormat <Hashtable>]
[-Culture <CultureInfo>]
[-DateSystem <NineteenHundred|NineteenFour>]
[-DateTimeOffsetMode <Text|Serial>]
[-Decimals <Int32>]
[-DocumentProperty <Hashtable>]
[-ExcludeProperty <String[]>]
[-FlattenOptions <OfficeObjectFlattenOptions>]
[-FreezeFirstColumn]
[-IgnoreMissingColumnFormat]
[-InputObject <Object>]
[-NoAutoFilter]
[-NoAutoFit]
[-NoClobber]
[-NoFreeze]
[-NoHeader]
[-NoRowStripes]
[-NoTable]
[-NoTableStyle]
[-PassThru]
[-Path] <String>
[-SaveOptions <ExcelSaveOptions>]
[-Sheet <OfficeSheetSelector>]
[-Show]
[-ShowColumnStripes]
[-ShowFirstColumn]
[-ShowLastColumn]
[-TableName <String>]
[-TableStyle <ExcelTableStyle>]
[-Theme <OfficeThemeInput>]
[-Title <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#member-b5099a3d019359e8a6785094)

Parameter set: `Create`

```
Export-OfficeExcel
[-Address <String>]
-Append
[-CollectionSeparator <String>]
[-ColumnFormat <Hashtable>]
[-Culture <CultureInfo>]
[-DateSystem <NineteenHundred|NineteenFour>]
[-DateTimeOffsetMode <Text|Serial>]
[-Decimals <Int32>]
[-DocumentProperty <Hashtable>]
[-ExcludeProperty <String[]>]
[-FlattenOptions <OfficeObjectFlattenOptions>]
[-FreezeFirstColumn]
[-IgnoreMissingColumnFormat]
[-InputObject <Object>]
[-NoAutoFilter]
[-NoAutoFit]
[-NoFreeze]
[-NoHeader]
[-NoRowStripes]
[-NoTable]
[-NoTableStyle]
[-PassThru]
[-Path] <String>
[-SaveOptions <ExcelSaveOptions>]
[-Sheet <OfficeSheetSelector>]
[-Show]
[-ShowColumnStripes]
[-ShowFirstColumn]
[-ShowLastColumn]
[-TableName <String>]
[-TableStyle <ExcelTableStyle>]
[-Theme <OfficeThemeInput>]
[-Title <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#member-65accd3fc5f97d9ca0b442b7)

Parameter set: `Append`

```
Export-OfficeExcel
[-Address <String>]
[-CollectionSeparator <String>]
[-ColumnFormat <Hashtable>]
[-Culture <CultureInfo>]
[-DateSystem <NineteenHundred|NineteenFour>]
[-DateTimeOffsetMode <Text|Serial>]
[-Decimals <Int32>]
[-DocumentProperty <Hashtable>]
[-ExcludeProperty <String[]>]
[-FlattenOptions <OfficeObjectFlattenOptions>]
[-FreezeFirstColumn]
[-IgnoreMissingColumnFormat]
[-InputObject <Object>]
[-NoAutoFilter]
[-NoAutoFit]
[-NoFreeze]
[-NoHeader]
[-NoRowStripes]
[-NoTable]
[-NoTableStyle]
[-PassThru]
[-Path] <String>
-ReplaceSheet
[-SaveOptions <ExcelSaveOptions>]
[-Sheet <OfficeSheetSelector>]
[-Show]
[-ShowColumnStripes]
[-ShowFirstColumn]
[-ShowLastColumn]
[-TableName <String>]
[-TableStyle <ExcelTableStyle>]
[-Theme <OfficeThemeInput>]
[-Title <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#member-0b2eaa2d162c4af5db002a75)

Parameter set: `ReplaceSheet`

## Description

Provides a fast PowerShell export path while keeping OfficeIMO as the workbook engine.

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Choose a PSWriteOffice Workflow](/docs/pswriteoffice/choosing-a-workflow/) Guide
  
  Decide between authoring, editing, inspection, conversion, and normalized Reader extraction. Includes examples and cmdlet links.
- [Import, Export, and Publish Excel Data](/docs/pswriteoffice/excel-export-publish/) Guide
  
  Move delimited data into Excel, export workbook visuals and HTML, and choose the right publishing surface for downstream readers.
- [Excel Quick Start](/docs/excel/quick-start/) Guide
  
  Create an Excel workbook with a typed table and a chart, then read it back, with OfficeIMO.Excel, PSWriteOffice, or the officeimo CLI.
- [Convert CSV to Excel](/docs/csv/convert-to-excel/) Guide
  
  Import CSV files into Excel worksheets as typed tables and export worksheets back to CSV with OfficeIMO.Excel.Csv, PSWriteOffice, and the officeimo CLI.
- [Workflow Finder](/docs/workflows/) Guide
  
  Choose an OfficeIMO or PSWriteOffice workflow by the input you have and the artifact you need. Includes examples and API links.
- [Import and Export Data](/docs/excel/import-export-data/) Guide
  
  Move data between Excel and .NET objects, DataTable, IDataReader, and CSV with OfficeIMO.Excel, PSWriteOffice, and the officeimo CLI.

## Examples

### Export objects in one line

```powershell
Get-Process | Export-OfficeExcel -Path .\Processes.xlsx -Show
```

Writes the running processes as a styled table with a frozen header and fitted columns, and opens the file.

### Export a titled sales sheet

```powershell
$export = @{
    Path         = '.\Reports\Q3-Sales.xlsx'
    Sheet        = 'Orders'
    TableName    = 'Orders'
    Title        = 'Q3 orders'
    ColumnFormat = @{ Margin = 'Percent' }
}
Import-OfficeCsv -Path .\Data\Q3-Orders.csv |
    Select-Object OrderId, Customer, Region, OrderDate, Amount, Margin |
    Export-OfficeExcel @export
```

Exports the Q3 orders as a named table under a title; dates and amounts are formatted from the data, and only the margin column is set explicitly as a percentage.

### Append a daily snapshot to a history table

```powershell
Get-Volume |
                Where-Object DriveLetter |
                Select-Object @{ Name = 'Date'; Expression = { Get-Date } }, DriveLetter, Size, SizeRemaining |
                Export-OfficeExcel -Path .\Reports\Disk-Usage.xlsx -Sheet History -TableName DiskHistory -Append
```

Adds today's free-space readings to the DiskHistory table, so the workbook grows into a capacity history one run at a time.

### Refresh one sheet of a workbook

```powershell
Import-OfficeCsv -Path .\Exports\open-tickets.csv |
                Export-OfficeExcel -Path .\Reports\Helpdesk.xlsx -Sheet 'Open tickets' -ReplaceSheet
```

Replaces only the Open tickets sheet with this morning's export and leaves the other sheets, charts and notes in the workbook untouched.

## Parameters

**-Address String optional**

A1 address of the target cell.

**-CollectionSeparator String optional**

Text inserted between collection values flattened into one cell.

**-ColumnFormat Hashtable optional**

Maps column headers to number-format presets, format codes or per-column option hashtables.

**-Culture CultureInfo optional**

Culture used for value conversion and number-format presets.

**-DateSystem ExcelDateSystem optional**

Workbook date system for Excel date serials.

Possible values: `NineteenHundred`, `NineteenFour`

**-DateTimeOffsetMode ExcelDateTimeOffsetWriteMode optional**

How DateTimeOffset values are written: Text (default) keeps the offset as ISO 8601 text; Serial writes local-time Excel dates.

Possible values: `Text`, `Serial`

**-Decimals Int32 optional**

Decimal places used for decimal, percent, currency, and scientific presets.

**-DocumentProperty Hashtable optional**

Workbook metadata keyed by native property name, such as Title, Author or Company.

**-ExcludeProperty String[] optional**

Exclude specific properties from exported objects.

**-FlattenOptions OfficeObjectFlattenOptions optional**

Nested-value projection policy; accepts a native options object or hashtable.

**-FreezeFirstColumn SwitchParameter optional**

Freeze the first exported column.

**-IgnoreMissingColumnFormat SwitchParameter optional**

Continue when a requested export-time column format header is missing.

**-InputObject Object optionalpipeline: True (ByValue)**

Objects, dictionaries or native tabular data supplied directly or through the pipeline.

**-NoAutoFilter SwitchParameter optional**

Omits table filter buttons.

**-NoAutoFit SwitchParameter optional**

Retains native column widths without fitting them to the data.

**-NoClobber SwitchParameter optionalsets: Create**

Do not overwrite an existing workbook.

**-NoFreeze SwitchParameter optional**

Keeps the header row scrollable.

**-NoHeader SwitchParameter optional**

Writes data without a header row.

**-NoRowStripes SwitchParameter optional**

Disables alternating row bands. An explicit false value enables them.

**-NoTable SwitchParameter optional**

Writes plain cells without creating a native Excel table.

**-NoTableStyle SwitchParameter optional**

Creates the table without a named visual style.

**-PassThru SwitchParameter optional**

Emits the native result after the operation.

**-Path String requiredposition: 0aliases: FilePath**

Workbook paths resolved with filesystem wildcard support.

**-SaveOptions ExcelSaveOptions optional**

Native save options or a hashtable, applied to a completed content block.

**-Sheet OfficeSheetSelector optionalaliases: WorksheetName**

Worksheet name, one-based position or native worksheet object. Multi-sheet commands also accept wildcard names.

**-Show SwitchParameter optional**

Open the saved file in its registered application after a local block completes.

**-ShowColumnStripes SwitchParameter optional**

Enables alternating column bands; explicit false clears them.

**-ShowFirstColumn SwitchParameter optional**

Emphasizes the first table column; explicit false removes the emphasis.

**-ShowLastColumn SwitchParameter optional**

Emphasizes the last table column; explicit false removes the emphasis.

**-TableName String optional**

Optional Excel table name.

**-TableStyle ExcelTableStyle optional**

Built-in Excel table style name.

Possible values: `TableStyleLight1`, `TableStyleLight2`, `TableStyleLight3`, `TableStyleLight4`, `TableStyleLight5`, `TableStyleLight6`, `TableStyleLight7`, `TableStyleLight8`, `TableStyleLight9`, `TableStyleLight10`, `TableStyleLight11`, `TableStyleLight12`, `TableStyleLight13`, `TableStyleLight14`, `TableStyleLight15`, `TableStyleLight16`, `TableStyleLight17`, `TableStyleLight18`, `TableStyleLight19`, `TableStyleLight20`, `TableStyleLight21`, `TableStyleMedium1`, `TableStyleMedium2`, `TableStyleMedium3`, `TableStyleMedium4`, `TableStyleMedium5`, `TableStyleMedium6`, `TableStyleMedium7`, `TableStyleMedium8`, `TableStyleMedium9`, `TableStyleMedium10`, `TableStyleMedium11`, `TableStyleMedium12`, `TableStyleMedium13`, `TableStyleMedium14`, `TableStyleMedium15`, `TableStyleMedium16`, `TableStyleMedium17`, `TableStyleMedium18`, `TableStyleMedium19`, `TableStyleMedium20`, `TableStyleMedium21`, `TableStyleMedium22`, `TableStyleMedium23`, `TableStyleMedium24`, `TableStyleMedium25`, `TableStyleMedium26`, `TableStyleMedium27`, `TableStyleMedium28`, `TableStyleDark1`, `TableStyleDark2`, `TableStyleDark3`, `TableStyleDark4`, `TableStyleDark5`, `TableStyleDark6`, `TableStyleDark7`, `TableStyleDark8`, `TableStyleDark9`, `TableStyleDark10`, `TableStyleDark11`

**-Theme OfficeThemeInput optional**

Built-in Office theme, native theme object or a document whose visual theme is read.

**-Title String optional**

Write a title above the exported table.

**-WhatIf SwitchParameter optional**

Shows what would happen if the command runs.

**-Confirm SwitchParameter optional**

Prompts for confirmation before running the command.

**-Append SwitchParameter requiredsets: Append**

Append rows to an existing worksheet when the workbook exists.

**-ReplaceSheet SwitchParameter requiredsets: ReplaceSheet**

Replaces the selected worksheet while retaining other workbook content.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:EEB87AB0C239530DEF100B9A2A8194EADFC7D33C84F508C6FCAFBA3B07415C09 -->
