# Add-OfficeOpenDocumentSheet

Adds a worksheet to an OpenDocument spreadsheet and optionally runs nested cell content.

Cmdlet 

Aliases: OpenDocumentSheet

**Module**

`PSWriteOffice`

**Aliases**

`OpenDocumentSheet`

**Inputs**

`OfficeIMO.OpenDocument.OdsDocument`

**Outputs**

`OfficeIMO.OpenDocument.OdsSheet`

**Source**

[AddOfficeOpenDocumentSheetCommand.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/OpenDocument/AddOfficeOpenDocumentSheetCommand.cs#L18) 

Adds a worksheet to an OpenDocument spreadsheet and optionally runs nested cell content.

## Syntax

```
Add-OfficeOpenDocumentSheet
[[-Content] <ScriptBlock>]
[-Document <OdsDocument>]
[-Name] <String>
[-PassThru]
[<CommonParameters>]
```

[#](#method-add-officeopendocumentsheet-scriptblock-odsdocument-string-switchparameter)

Parameter set: `Default`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Open Formats and Text Automation](/docs/pswriteoffice/open-text-formats/) Guide
  
  Use the smaller PSWriteOffice families for text, interchange, open formats, and managed message workflows. Includes examples and cmdlet links.
- [Create and Read ODT, ODS and ODP Files](/docs/open-document/create-read/) Guide
  
  Create OpenDocument text, spreadsheet and presentation files, read their content, edit them in place, and open password-protected files.

## Examples

### Add a worksheet inside an OpenDocument DSL.

```powershell
Add-OfficeOpenDocumentSheet -Name 'Data' -Content {
    Set-OfficeOpenDocumentCell -Row 0 -Column 0 -Value 'Status'
}
```

## Parameters

**-Content ScriptBlock optionalposition: 1**

Nested cell commands that use this worksheet as their current target.

**-Document OdsDocument optionalpipeline: True (ByValue)**

OpenDocument spreadsheet. Omit inside New-OfficeOpenDocument -Content.

**-Name String requiredposition: 0**

Worksheet name.

**-PassThru SwitchParameter optional**

Emit the created worksheet.

## 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:2CD15C95ADC87143BD828C3D303F5CEBB0AF6A273C7C3F459229FB75842B8B85 -->
