OfficeIMO

API Reference

Command

Add-OfficeExcelTableOfContents

Namespace PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
OfficeIMO.Excel.ExcelDocument System.IO.FileInfo

Adds or refreshes a workbook table of contents sheet.

Remarks

Adds or refreshes a workbook table of contents sheet.

Examples

Add a TOC sheet to an existing workbook.


PS>Add-OfficeExcelTableOfContents -Path .\report.xlsx -IncludeNamedRanges -AddBackLinks
        

Creates or refreshes a TOC sheet, lists named ranges, and adds back links on other sheets.

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

Add-OfficeExcelTableOfContents [-AddBackLinks] [-BackLinkColumn <Int32>] [-BackLinkRow <Int32>] [-BackLinkText <String>] [-DoNotPlaceFirst] [-IncludeHiddenNamedRanges] [-IncludeNamedRanges] [-NoHyperlinks] [-NoStyle] [-Open] [-PassThru] [-SheetName <String>] [<CommonParameters>]
#
Parameter set: Context

Parameters

AddBackLinks SwitchParameter optionalposition: namedpipeline: False
Add a quick link back to the TOC on each worksheet.
BackLinkColumn Int32 optionalposition: namedpipeline: False
Column for the back link when AddBackLinks is used.
BackLinkRow Int32 optionalposition: namedpipeline: False
Row for the back link when AddBackLinks is used.
BackLinkText String optionalposition: namedpipeline: False
Text used for back links.
DoNotPlaceFirst SwitchParameter optionalposition: namedpipeline: False
Keep the TOC sheet in its current position instead of moving it first.
IncludeHiddenNamedRanges SwitchParameter optionalposition: namedpipeline: False
Include hidden named ranges when listing named ranges.
IncludeNamedRanges SwitchParameter optionalposition: namedpipeline: False
Include named ranges in the TOC.
NoHyperlinks SwitchParameter optionalposition: namedpipeline: False
Disable internal hyperlinks in the TOC sheet.
NoStyle SwitchParameter optionalposition: namedpipeline: False
Disable formatted TOC styling.
Open SwitchParameter optionalposition: namedpipeline: False
Open the workbook after saving when InputPath is used.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated document or file info.
SheetName String optionalposition: namedpipeline: False
Name of the TOC sheet.

Outputs

OfficeIMO.Excel.ExcelDocument System.IO.FileInfo

Add-OfficeExcelTableOfContents [-AddBackLinks] [-BackLinkColumn <Int32>] [-BackLinkRow <Int32>] [-BackLinkText <String>] [-DoNotPlaceFirst] [-IncludeHiddenNamedRanges] [-IncludeNamedRanges] -InputPath <String> [-NoHyperlinks] [-NoStyle] [-Open] [-PassThru] [-SheetName <String>] [<CommonParameters>]
#
Parameter set: Path

Parameters

AddBackLinks SwitchParameter optionalposition: namedpipeline: False
Add a quick link back to the TOC on each worksheet.
BackLinkColumn Int32 optionalposition: namedpipeline: False
Column for the back link when AddBackLinks is used.
BackLinkRow Int32 optionalposition: namedpipeline: False
Row for the back link when AddBackLinks is used.
BackLinkText String optionalposition: namedpipeline: False
Text used for back links.
DoNotPlaceFirst SwitchParameter optionalposition: namedpipeline: False
Keep the TOC sheet in its current position instead of moving it first.
IncludeHiddenNamedRanges SwitchParameter optionalposition: namedpipeline: False
Include hidden named ranges when listing named ranges.
IncludeNamedRanges SwitchParameter optionalposition: namedpipeline: False
Include named ranges in the TOC.
InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Path to the workbook to update in place.
NoHyperlinks SwitchParameter optionalposition: namedpipeline: False
Disable internal hyperlinks in the TOC sheet.
NoStyle SwitchParameter optionalposition: namedpipeline: False
Disable formatted TOC styling.
Open SwitchParameter optionalposition: namedpipeline: False
Open the workbook after saving when InputPath is used.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated document or file info.
SheetName String optionalposition: namedpipeline: False
Name of the TOC sheet.

Outputs

OfficeIMO.Excel.ExcelDocument System.IO.FileInfo

Add-OfficeExcelTableOfContents [-AddBackLinks] [-BackLinkColumn <Int32>] [-BackLinkRow <Int32>] [-BackLinkText <String>] -Document <ExcelDocument> [-DoNotPlaceFirst] [-IncludeHiddenNamedRanges] [-IncludeNamedRanges] [-NoHyperlinks] [-NoStyle] [-Open] [-PassThru] [-SheetName <String>] [<CommonParameters>]
#
Parameter set: Document

Parameters

AddBackLinks SwitchParameter optionalposition: namedpipeline: False
Add a quick link back to the TOC on each worksheet.
BackLinkColumn Int32 optionalposition: namedpipeline: False
Column for the back link when AddBackLinks is used.
BackLinkRow Int32 optionalposition: namedpipeline: False
Row for the back link when AddBackLinks is used.
BackLinkText String optionalposition: namedpipeline: False
Text used for back links.
Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to update.
DoNotPlaceFirst SwitchParameter optionalposition: namedpipeline: False
Keep the TOC sheet in its current position instead of moving it first.
IncludeHiddenNamedRanges SwitchParameter optionalposition: namedpipeline: False
Include hidden named ranges when listing named ranges.
IncludeNamedRanges SwitchParameter optionalposition: namedpipeline: False
Include named ranges in the TOC.
NoHyperlinks SwitchParameter optionalposition: namedpipeline: False
Disable internal hyperlinks in the TOC sheet.
NoStyle SwitchParameter optionalposition: namedpipeline: False
Disable formatted TOC styling.
Open SwitchParameter optionalposition: namedpipeline: False
Open the workbook after saving when InputPath is used.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated document or file info.
SheetName String optionalposition: namedpipeline: False
Name of the TOC sheet.

Outputs

OfficeIMO.Excel.ExcelDocument System.IO.FileInfo