• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class WorkbookMediaExtensions

Provides access to embedded media (images) stored in a workbook's media cache.

Inheritance
object
WorkbookMediaExtensions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public static class WorkbookMediaExtensions

Methods

GetEmbeddedImage(Workbook, string)

Gets the embedded image bytes for the specified media file name.

Declaration
public static byte[]? GetEmbeddedImage(this Workbook workbook, string imageFileName)
Parameters
Type Name Description
Workbook workbook

The workbook.

string imageFileName

The media file name (e.g. "image1.png").

Returns
Type Description
byte[]

The image bytes, or null if not found.

GetImageContentType(string)

Gets the content type for an image based on its file extension.

Declaration
public static string GetImageContentType(string imageFileName)
Parameters
Type Name Description
string imageFileName

The image file name.

Returns
Type Description
string

The MIME content type.

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX