GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    ExcelDrawing Class

    Namespace:
    GemBox.Spreadsheet
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a base class for all drawings (pictures, charts, etc.) in the worksheet.

    • C#
    • VB.NET
    public abstract class ExcelDrawing
    Public MustInherit Class ExcelDrawing
    Inheritance:
    System.Object
    ExcelDrawing
    Derived
    ExcelChart
    ExcelFormControl
    ExcelEmbeddedObject
    ExcelGroupShape
    ExcelPicture
    ExcelShape

    Properties

    Hyperlink

    Gets or sets the hyperlink on this drawing (picture, chart, etc.).

    • C#
    • VB.NET
    public SpreadsheetHyperlink Hyperlink { get; set; }
    Public Property Hyperlink As SpreadsheetHyperlink
    Property Value
    SpreadsheetHyperlink

    The hyperlink on this drawing (picture, chart, etc.).

    Remarks

    Supported only in XLSX and XLSB.

    Metadata

    Gets the metadata (non-visual properties) of this ExcelDrawing instance.

    • C#
    • VB.NET
    public ExcelDrawingMetadata Metadata { get; }
    Public ReadOnly Property Metadata As ExcelDrawingMetadata
    Property Value
    ExcelDrawingMetadata

    The metadata (non-visual properties) of this ExcelDrawing instance.

    Position

    Gets the position of this drawing (picture, chart, etc.) in the worksheet.

    • C#
    • VB.NET
    public ExcelDrawingPosition Position { get; }
    Public ReadOnly Property Position As ExcelDrawingPosition
    Property Value
    ExcelDrawingPosition

    The position of this drawing (picture, chart, etc.) in the worksheet.

    Worksheet

    Gets the parent worksheet.

    • C#
    • VB.NET
    public ExcelWorksheet Worksheet { get; }
    Public ReadOnly Property Worksheet As ExcelWorksheet
    Property Value
    ExcelWorksheet

    The parent worksheet.

    ZIndex

    Gets the z-order position of the picture. -1 if the picture is not contained in proper collection.

    • C#
    • VB.NET
    public int ZIndex { get; }
    Public ReadOnly Property ZIndex As Integer
    Property Value
    System.Int32

    The z-order position of the picture.

    Methods

    Format()

    Formats this drawing (picture, chart, etc.) to its default size so it can be exported to PDF, XPS, image or be printed.

    • C#
    • VB.NET
    public FormattedExcelDrawing Format()
    Public Function Format As FormattedExcelDrawing
    Returns
    FormattedExcelDrawing

    Formatted drawing (picture, chart, etc.) which can be exported to PDF, XPS, image or be printed.

    Exceptions
    SpreadsheetException

    Drawing cannot be formatted because it doesn't belong to any worksheet.

    Format(Double, Double, LengthUnit)

    Formats this drawing (picture, chart, etc.) to specified size so it can be exported to PDF, XPS, image or be printed.

    • C#
    • VB.NET
    public FormattedExcelDrawing Format(double width, double height, LengthUnit unit)
    Public Function Format(width As Double, height As Double, unit As LengthUnit) As FormattedExcelDrawing
    Parameters
    width
    System.Double

    The formatted drawing width.

    height
    System.Double

    The formatted drawing height.

    unit
    LengthUnit

    The formatted drawing width / height length unit.

    Returns
    FormattedExcelDrawing

    Formatted drawing (picture, chart, etc.) which can be exported to PDF, XPS, image or be printed.

    Exceptions
    SpreadsheetException

    Drawing cannot be formatted because it doesn't belong to any worksheet.

    See Also

    ExcelPicture
    ExcelShape
    ExcelChart
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.