API Reference
Cmdlet
Invoke-OfficeExcelTemplateSheet
Repeats an Excel template worksheet for pipeline data and applies markers in each generated sheet.
Remarks
Repeats an Excel template worksheet for pipeline data and applies markers in each generated sheet.
Examples
Create one invoice worksheet per pipeline object.
PS>
$invoices | Invoke-OfficeExcelTemplateSheet -Path .\Invoices.xlsx -TemplateSheet Template -SheetNameProperty SheetName
Uses the template sheet for the first object, copies it for later objects, binds markers, and saves the workbook.
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
Invoke-OfficeExcelTemplateSheet [-CultureName <String>] -Item <Object> [-MissingValueBehavior <Nullable`1>] [-PassThru] [-SheetNameProperty <String>] [-TemplateSheet <String>] [-ThrowOnMissing] [<CommonParameters>]#Parameter set:
ContextParameters
- CultureName String
- Culture name used for built-in marker format aliases such as currency and date.
- Item Object
- Pipeline data. Hashtables, dictionaries, PSCustomObjects, and typed objects are supported.
- MissingValueBehavior Nullable`1
- Behavior used when a marker is not supplied by each input item.
- PassThru SwitchParameter
- Returns the number of marker replacements.
- SheetNameProperty String
- Input property used as the generated worksheet name.
- TemplateSheet String
- Template worksheet name. Defaults to the current sheet inside an ExcelSheet block or the first sheet for path/document use.
- ThrowOnMissing SwitchParameter
- Throws when a marker is not supplied by an input item.
Outputs
System.Int32
Invoke-OfficeExcelTemplateSheet [-CultureName <String>] -InputPath <String> -Item <Object> [-MissingValueBehavior <Nullable`1>] [-PassThru] [-SheetNameProperty <String>] [-TemplateSheet <String>] [-ThrowOnMissing] [<CommonParameters>]#Parameter set:
PathParameters
- CultureName String
- Culture name used for built-in marker format aliases such as currency and date.
- InputPath String
- Workbook path to update.
- Item Object
- Pipeline data. Hashtables, dictionaries, PSCustomObjects, and typed objects are supported.
- MissingValueBehavior Nullable`1
- Behavior used when a marker is not supplied by each input item.
- PassThru SwitchParameter
- Returns the number of marker replacements.
- SheetNameProperty String
- Input property used as the generated worksheet name.
- TemplateSheet String
- Template worksheet name. Defaults to the current sheet inside an ExcelSheet block or the first sheet for path/document use.
- ThrowOnMissing SwitchParameter
- Throws when a marker is not supplied by an input item.
Outputs
System.Int32
Invoke-OfficeExcelTemplateSheet [-CultureName <String>] -Document <ExcelDocument> -Item <Object> [-MissingValueBehavior <Nullable`1>] [-PassThru] [-SheetNameProperty <String>] [-TemplateSheet <String>] [-ThrowOnMissing] [<CommonParameters>]#Parameter set:
DocumentParameters
- CultureName String
- Culture name used for built-in marker format aliases such as currency and date.
- Document ExcelDocument
- Workbook to update outside the DSL context.
- Item Object
- Pipeline data. Hashtables, dictionaries, PSCustomObjects, and typed objects are supported.
- MissingValueBehavior Nullable`1
- Behavior used when a marker is not supplied by each input item.
- PassThru SwitchParameter
- Returns the number of marker replacements.
- SheetNameProperty String
- Input property used as the generated worksheet name.
- TemplateSheet String
- Template worksheet name. Defaults to the current sheet inside an ExcelSheet block or the first sheet for path/document use.
- ThrowOnMissing SwitchParameter
- Throws when a marker is not supplied by an input item.
Outputs
System.Int32