Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficeExcelTimeline

Aliases: ExcelTimeline
Module PSWriteOffice
Aliases
ExcelTimeline
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Management.Automation.PSObject

Adds OfficeIMO-owned workbook timeline binding metadata.

Syntax

Add-OfficeExcelTimeline -Name <String> [-PassThru] [-PivotTableName <String>] [-SourceName <String>] [-Xml <String>] [<CommonParameters>]
#
Parameter set: Context
Add-OfficeExcelTimeline -Name <String> [-PassThru] [-Path] <String> [-PivotTableName <String>] [-SourceName <String>] [-Xml <String>] [<CommonParameters>]
#
Parameter set: Path
Add-OfficeExcelTimeline -Document <ExcelDocument> -Name <String> [-PassThru] [-PivotTableName <String>] [-SourceName <String>] [-Xml <String>] [<CommonParameters>]
#
Parameter set: Document

Examples

Authored help example

Add timeline binding metadata for a pivot date field.

$timeline = Add-OfficeExcelTimeline -Path .\Report.xlsx -Name OrderDateTimeline -SourceName OrderDate -PivotTableName SalesPivot -PassThru
Get-OfficeExcelDataModel -Path .\Report.xlsx |
    Select-Object -ExpandProperty TimelineCacheCount

Writes portable OfficeIMO binding metadata. It does not create native Excel timeline caches or UI shapes.

Parameters

-Name String required
Timeline cache name.
-PassThru SwitchParameter optional
Emit metadata about the added package part.
-PivotTableName String optional
Pivot table name the timeline is intended to filter.
-SourceName String optional
Source date field, table column, or pivot field name.
-Xml String optional
Caller-supplied timeline cache XML. When provided, OfficeIMO preserves it within its pivot-interaction metadata envelope.
-Path String requiredposition: 0aliases: FilePath, InputPathsets: Path
Workbook path to update.
-Document ExcelDocument requiredpipeline: True (ByValue)sets: Document
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.