API Reference

Class

ExcelTemplateImage

Namespace OfficeIMO.Excel
Assembly OfficeIMO.Excel
Modifiers sealed

Image value that can be bound to a whole-cell template marker.

Inheritance

  • Object
  • ExcelTemplateImage

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Methods

public static ExcelTemplateImage FromBytes(Byte[] bytes, String contentType = "image/png", Int32 widthPixels = 96, Int32 heightPixels = 32, Int32 offsetXPixels = 0, Int32 offsetYPixels = 0, String name = null, String altText = null, Boolean lockAspectRatio = true) #
Returns: ExcelTemplateImage

Creates a template image from bytes.

Parameters

bytes System.Byte[] requiredposition: 0
contentType System.String = "image/png" optionalposition: 1
widthPixels System.Int32 = 96 optionalposition: 2
heightPixels System.Int32 = 32 optionalposition: 3
offsetXPixels System.Int32 = 0 optionalposition: 4
offsetYPixels System.Int32 = 0 optionalposition: 5
name System.String = null optionalposition: 6
altText System.String = null optionalposition: 7
lockAspectRatio System.Boolean = true optionalposition: 8
public static ExcelTemplateImage FromStream(Stream stream, String contentType = "image/png", Int32 widthPixels = 96, Int32 heightPixels = 32, Int32 offsetXPixels = 0, Int32 offsetYPixels = 0, String name = null, String altText = null, Boolean lockAspectRatio = true) #
Returns: ExcelTemplateImage

Creates a template image from a stream.

Parameters

stream System.IO.Stream requiredposition: 0
contentType System.String = "image/png" optionalposition: 1
widthPixels System.Int32 = 96 optionalposition: 2
heightPixels System.Int32 = 32 optionalposition: 3
offsetXPixels System.Int32 = 0 optionalposition: 4
offsetYPixels System.Int32 = 0 optionalposition: 5
name System.String = null optionalposition: 6
altText System.String = null optionalposition: 7
lockAspectRatio System.Boolean = true optionalposition: 8
public static ExcelTemplateImage FromUrl(String url, Int32 widthPixels = 96, Int32 heightPixels = 32, Int32 offsetXPixels = 0, Int32 offsetYPixels = 0, String name = null, String altText = null, Boolean lockAspectRatio = true) #
Returns: ExcelTemplateImage

Creates a template image from a remote URL. The image is downloaded when the template is applied.

Parameters

url System.String requiredposition: 0
widthPixels System.Int32 = 96 optionalposition: 1
heightPixels System.Int32 = 32 optionalposition: 2
offsetXPixels System.Int32 = 0 optionalposition: 3
offsetYPixels System.Int32 = 0 optionalposition: 4
name System.String = null optionalposition: 5
altText System.String = null optionalposition: 6
lockAspectRatio System.Boolean = true optionalposition: 7

Properties

public Byte[] Bytes { get; } #

Image bytes when the image is supplied directly.

public String Url { get; } #

Remote image URL when the image should be downloaded during binding.

public String ContentType { get; } #

Image content type, such as image/png or image/jpeg.

public Int32 WidthPixels { get; } #

Image width in pixels.

public Int32 HeightPixels { get; } #

Image height in pixels.

public Int32 OffsetXPixels { get; } #

Horizontal pixel offset from the target cell.

public Int32 OffsetYPixels { get; } #

Vertical pixel offset from the target cell.

public String Name { get; } #

Optional drawing name.

public String AltText { get; } #

Optional alternative text description.

public Boolean LockAspectRatio { get; } #

Whether Excel should keep the picture aspect ratio locked.