Class
ExcelTemplateImage
OfficeIMO.Excel
Image value that can be bound to a whole-cell template marker.
Inheritance
- object
- ExcelTemplateImage
Usage
Explore 3 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 3
Methods
public static ExcelTemplateImage FromBytes(byte[] bytes, string contentType = "image/png", OfficeLength? width = null, OfficeLength? height = null, OfficeLength offsetX = default, OfficeLength offsetY = default, string? name = null, string? altText = null, bool lockAspectRatio = true) #Creates a template image from bytes.
Parameters
- bytes byte[]
- contentType string = "image/png"
- width OfficeIMO.OfficeLength? = null
- height OfficeIMO.OfficeLength? = null
- offsetX OfficeIMO.OfficeLength = default
- offsetY OfficeIMO.OfficeLength = default
- name string? = null
- altText string? = null
- lockAspectRatio bool = true
Returns
ExcelTemplateImagepublic static ExcelTemplateImage FromStream(Stream stream, string contentType = "image/png", OfficeLength? width = null, OfficeLength? height = null, OfficeLength offsetX = default, OfficeLength offsetY = default, string? name = null, string? altText = null, bool lockAspectRatio = true) #Creates a template image from a stream.
Parameters
- stream System.IO.Stream
- contentType string = "image/png"
- width OfficeIMO.OfficeLength? = null
- height OfficeIMO.OfficeLength? = null
- offsetX OfficeIMO.OfficeLength = default
- offsetY OfficeIMO.OfficeLength = default
- name string? = null
- altText string? = null
- lockAspectRatio bool = true
Returns
ExcelTemplateImageFromUrlAsync 2 overloads
public static async Task<ExcelTemplateImage> FromUrlAsync(string url, OfficeLength? width = null, OfficeLength? height = null, OfficeLength offsetX = default, OfficeLength offsetY = default, string? name = null, string? altText = null, bool lockAspectRatio = true, CancellationToken cancellationToken = default) #Asynchronously creates a template image from a remote URL.
Parameters
- url string
- width OfficeIMO.OfficeLength? = null
- height OfficeIMO.OfficeLength? = null
- offsetX OfficeIMO.OfficeLength = default
- offsetY OfficeIMO.OfficeLength = default
- name string? = null
- altText string? = null
- lockAspectRatio bool = true
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<ExcelTemplateImage>public static Task<ExcelTemplateImage> FromUrlAsync(string url, OfficeRemoteImageLoadOptions remoteImageOptions, OfficeLength? width = null, OfficeLength? height = null, OfficeLength offsetX = default, OfficeLength offsetY = default, string? name = null, string? altText = null, bool lockAspectRatio = true, CancellationToken cancellationToken = default) #Creates a template image using an explicit remote-network policy.
Parameters
- url string
- remoteImageOptions OfficeIMO.Drawing.OfficeRemoteImageLoadOptions
- width OfficeIMO.OfficeLength? = null
- height OfficeIMO.OfficeLength? = null
- offsetX OfficeIMO.OfficeLength = default
- offsetY OfficeIMO.OfficeLength = default
- name string? = null
- altText string? = null
- lockAspectRatio bool = true
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<ExcelTemplateImage>Inherited Methods
Properties
public string ContentType { get; } #Image content type, such as image/png or image/jpeg.
public OfficeLength OffsetX { get; } #Horizontal length offset from the target cell.
public OfficeLength OffsetY { get; } #Vertical length offset from the target cell.
public bool LockAspectRatio { get; } #Whether Excel should keep the picture aspect ratio locked.