OfficeIMO

API Reference

Command

Add-OfficeExcelImageFromUrl

Namespace PSWriteOffice
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Object

Adds an image from a URL anchored to a worksheet cell.

Remarks

Adds an image from a URL anchored to a worksheet cell.

Examples

Insert an image from a URL at B2.


PS>ExcelSheet 'Data' { Add-OfficeExcelImageFromUrl -Address 'B2' -Url 'https://example.org/logo.png' -WidthPixels 120 -HeightPixels 40 }
        

Downloads the remote image and anchors it to cell B2.

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-OfficeExcelImageFromUrl [-Address <String>] [-Column <Nullable`1>] [-HeightPixels <Int32>] [-OffsetXPixels <Int32>] [-OffsetYPixels <Int32>] [-PassThru] [-Row <Nullable`1>] -Url <String> [-WidthPixels <Int32>] [<CommonParameters>]
#
Parameter set: Context

Parameters

Address String optionalposition: namedpipeline: False
A1-style cell address (e.g., A1, C5).
Column Nullable`1 optionalposition: namedpipeline: False
1-based column index.
HeightPixels Int32 optionalposition: namedpipeline: False
Image height in pixels.
OffsetXPixels Int32 optionalposition: namedpipeline: False
Horizontal offset in pixels from the cell origin.
OffsetYPixels Int32 optionalposition: namedpipeline: False
Vertical offset in pixels from the cell origin.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the worksheet after inserting the image.
Row Nullable`1 optionalposition: namedpipeline: False
1-based row index.
Url String requiredposition: 0pipeline: False
Image URL to download.
WidthPixels Int32 optionalposition: namedpipeline: False
Image width in pixels.

Outputs

System.Object

Add-OfficeExcelImageFromUrl [-Address <String>] [-Column <Nullable`1>] -Document <ExcelDocument> [-HeightPixels <Int32>] [-OffsetXPixels <Int32>] [-OffsetYPixels <Int32>] [-PassThru] [-Row <Nullable`1>] [-Sheet <String>] [-SheetIndex <Nullable`1>] -Url <String> [-WidthPixels <Int32>] [<CommonParameters>]
#
Parameter set: Document

Parameters

Address String optionalposition: namedpipeline: False
A1-style cell address (e.g., A1, C5).
Column Nullable`1 optionalposition: namedpipeline: False
1-based column index.
Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to operate on outside the DSL context.
HeightPixels Int32 optionalposition: namedpipeline: False
Image height in pixels.
OffsetXPixels Int32 optionalposition: namedpipeline: False
Horizontal offset in pixels from the cell origin.
OffsetYPixels Int32 optionalposition: namedpipeline: False
Vertical offset in pixels from the cell origin.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the worksheet after inserting the image.
Row Nullable`1 optionalposition: namedpipeline: False
1-based row index.
Sheet String optionalposition: namedpipeline: False
Worksheet name when using Document.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) when using Document.
Url String requiredposition: 0pipeline: False
Image URL to download.
WidthPixels Int32 optionalposition: namedpipeline: False
Image width in pixels.

Outputs

System.Object