API Reference
Class
ExcelTemplateImage
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.
Returned or exposed by
- Method ExcelTemplateImage.FromBytes
- Method ExcelTemplateImage.FromStream
- Method ExcelTemplateImage.FromUrl
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:
ExcelTemplateImageCreates a template image from bytes.
Parameters
- bytes System.Byte[]
- contentType System.String = "image/png"
- widthPixels System.Int32 = 96
- heightPixels System.Int32 = 32
- offsetXPixels System.Int32 = 0
- offsetYPixels System.Int32 = 0
- name System.String = null
- altText System.String = null
- lockAspectRatio System.Boolean = true
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:
ExcelTemplateImageCreates a template image from a stream.
Parameters
- stream System.IO.Stream
- contentType System.String = "image/png"
- widthPixels System.Int32 = 96
- heightPixels System.Int32 = 32
- offsetXPixels System.Int32 = 0
- offsetYPixels System.Int32 = 0
- name System.String = null
- altText System.String = null
- lockAspectRatio System.Boolean = true
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:
ExcelTemplateImageCreates a template image from a remote URL. The image is downloaded when the template is applied.
Parameters
- url System.String
- widthPixels System.Int32 = 96
- heightPixels System.Int32 = 32
- offsetXPixels System.Int32 = 0
- offsetYPixels System.Int32 = 0
- name System.String = null
- altText System.String = null
- lockAspectRatio System.Boolean = true
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object
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 OffsetXPixels { get; } #Horizontal pixel offset from the target cell.
public Int32 OffsetYPixels { get; } #Vertical pixel offset from the target cell.
public String AltText { get; } #Optional alternative text description.
public Boolean LockAspectRatio { get; } #Whether Excel should keep the picture aspect ratio locked.