Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

New-OfficeExcelHtmlOptions

Module
PSWriteOffice
Inputs
None

Creates Excel-to-HTML settings for Convert-OfficeDocument -To Html.

Syntax

New-OfficeExcelHtmlOptions
[-EmptyCellText <String>]
[-MaxRowsPerSheet <Int32>]
[-NoDefaultStyles]
[-Profile <SemanticTables|VisualReview>]
[-Theme <OfficeThemeInput>]
[-Title <String>]
[<CommonParameters>]
#
Parameter set: Default

Examples

Convert a workbook to HTML

Convert-OfficeDocument -Path .\Reports\Q3-Sales.xlsx -To Html -OutputPath .\Site\Q3-Sales.html -Options (New-OfficeExcelHtmlOptions -Title 'Q3 sales')

Converts a workbook to a web page with a title.

Publish a visual review page

$html = New-OfficeExcelHtmlOptions -Profile VisualReview -Theme Boardroom -Title 'Operations dashboard' -MaxRowsPerSheet 500
Convert-OfficeDocument -Path .\Reports\Operations.xlsx -To Html -OutputPath .\Site\Operations.html -Options $html

Renders the workbook as a visual review page in the Boardroom theme, capped at 500 rows per sheet for a fast page.

Parameters

-EmptyCellText String optional
Text used for empty cells in semantic table output.
-MaxRowsPerSheet Int32 optional
Maximum number of used rows to emit per worksheet.
-NoDefaultStyles SwitchParameter optional
Do not include OfficeIMO default CSS styles.
-Profile OfficeExcelHtmlProfile optional
HTML conversion profile.
Possible values: SemanticTables, VisualReview
-Theme OfficeThemeInput optional
Built-in Office theme, native theme object or a document whose visual theme is read.
-Title String optional
Chart title.

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.