Skip to main content
All docs
V25.1
  • Row

    DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    ImageInfo Interface

    Exposes members used to specify information about an image placed in a cell.

    Namespace: DevExpress.Spreadsheet

    Assembly: DevExpress.Spreadsheet.v25.1.Core.dll

    NuGet Package: DevExpress.Spreadsheet.Core

    #Declaration

    public interface ImageInfo

    The following members return ImageInfo objects:

    #Example

    The following code snippet places an image from a stream in a cell and specifies its alternative text:

    using (Workbook workbook = new Workbook()) {
        Worksheet worksheet = workbook.Worksheets.ActiveWorksheet;
    
        byte[] imageBytes = File.ReadAllBytes("image.png");
    
        // Insert cell images from a stream
        worksheet.Cells["A2"].Value = imageStream;
    
        // Specify image information
        if (worksheet.Cells["A2"].Value.IsCellImage) {
            worksheet.Cells["A2"].ImageInfo.Decorative = true;
            worksheet.Cells["A2"].ImageInfo.AlternativeText = "Image AltText";
        }
    
        workbook.SaveDocument("result.xlsx");
    }
    
    See Also