API Reference
Command
Add-OfficeExcelImageFromUrl
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:
ContextParameters
- Address String
- A1-style cell address (e.g., A1, C5).
- Column Nullable`1
- 1-based column index.
- HeightPixels Int32
- Image height in pixels.
- OffsetXPixels Int32
- Horizontal offset in pixels from the cell origin.
- OffsetYPixels Int32
- Vertical offset in pixels from the cell origin.
- PassThru SwitchParameter
- Emit the worksheet after inserting the image.
- Row Nullable`1
- 1-based row index.
- Url String
- Image URL to download.
- WidthPixels Int32
- 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:
DocumentParameters
- Address String
- A1-style cell address (e.g., A1, C5).
- Column Nullable`1
- 1-based column index.
- Document ExcelDocument
- Workbook to operate on outside the DSL context.
- HeightPixels Int32
- Image height in pixels.
- OffsetXPixels Int32
- Horizontal offset in pixels from the cell origin.
- OffsetYPixels Int32
- Vertical offset in pixels from the cell origin.
- PassThru SwitchParameter
- Emit the worksheet after inserting the image.
- Row Nullable`1
- 1-based row index.
- Sheet String
- Worksheet name when using Document.
- SheetIndex Nullable`1
- Worksheet index (0-based) when using Document.
- Url String
- Image URL to download.
- WidthPixels Int32
- Image width in pixels.
Outputs
System.Object