Cmdlet
Invoke-OfficeExcelTemplateRow
Repeats an Excel template row for pipeline data and replaces markers in each inserted row.
Syntax
Invoke-OfficeExcelTemplateRow
[-CultureName <String>]
[-InputObject] <Object>
[-MissingValueBehavior <PreserveMarker| EmptyString| Throw>]
[-PassThru]
[-Sheet <String>]
[-SheetIndex <Int32>]
-TemplateRow <Int32>
[-ThrowOnMissing]
[<CommonParameters>]#Parameter set:
ContextInvoke-OfficeExcelTemplateRow
[-CultureName <String>]
[-InputObject] <Object>
[-MissingValueBehavior <PreserveMarker| EmptyString| Throw>]
[-PassThru]
[-Path] <String>
[-Sheet <String>]
[-SheetIndex <Int32>]
-TemplateRow <Int32>
[-ThrowOnMissing]
[<CommonParameters>]#Parameter set:
PathInvoke-OfficeExcelTemplateRow
[-CultureName <String>]
-Document <ExcelDocument>
[-InputObject] <Object>
[-MissingValueBehavior <PreserveMarker| EmptyString| Throw>]
[-PassThru]
[-Sheet <String>]
[-SheetIndex <Int32>]
-TemplateRow <Int32>
[-ThrowOnMissing]
[<CommonParameters>]#Parameter set:
DocumentExamples
Fill invoice line rows from pipeline objects.
$items | Invoke-OfficeExcelTemplateRow -Path .\Invoice.xlsx -Sheet Invoice -TemplateRow 12 -CultureName en-USCopies the template row once per input object, applies marker values, and saves the workbook.
Parameters
- -CultureName String
- Culture name used for built-in marker format aliases such as currency and date.
- -InputObject Object
- Pipeline data. Hashtables, dictionaries, PSCustomObjects, and typed objects are supported.
- -MissingValueBehavior ExcelTemplateMissingValueBehavior
- Behavior used when a marker is not supplied by each input row.
- Possible values:
PreserveMarker,EmptyString,Throw - -PassThru SwitchParameter
- Returns the number of marker replacements.
- -Sheet String
- Worksheet name. Defaults to the current sheet inside an ExcelSheet block.
- -SheetIndex Int32
- Worksheet index when using a workbook object or path.
- -TemplateRow Int32
- 1-based row number that contains template markers to repeat.
- -ThrowOnMissing SwitchParameter
- Throws when a marker is not supplied by an input row.
- -Path String
- Workbook path to update.
- -Document ExcelDocument
- Workbook to update outside the DSL context.
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.