Table of Contents

Class XlsShape

Namespace
Spire.Xls.Core.Spreadsheet.Shapes
Assembly
Spire.XLS.dll
public class XlsShape : XlsObject, IShape, IExcelApplication, IDisposable, ICloneParent, INamedObject
Inheritance
XlsShape
Implements
Derived
Inherited Members

Properties

AlternativeText

Returns or sets the descriptive (alternative) text string for a Shape object when the object is saved to a Web page. Read/write String

public string AlternativeText { get; set; }

Property Value

string

AlternativeTextTitle

Returns or sets the descriptive (alternative) text title string for a Shape object when the object is saved to a Web page. Read/write String

public string AlternativeTextTitle { get; set; }

Property Value

string

AutoSize

public bool AutoSize { get; set; }

Property Value

bool

BottomRow

Bottom row.

public int BottomRow { get; set; }

Property Value

int

BottomRowOffset

Bottom row offset.

public int BottomRowOffset { get; set; }

Property Value

int

Fill

Represents fill properties.

public IShapeFill Fill { get; }

Property Value

IShapeFill

Glow

public IGlow Glow { get; }

Property Value

IGlow

HasFill

public bool HasFill { get; set; }

Property Value

bool

HasLineFormat

public bool HasLineFormat { get; set; }

Property Value

bool

Height

Height of object.

public int Height { get; set; }

Property Value

int

HtmlString

Gets and sets the html string which contains data and some formattings in this shape.

public string HtmlString { get; set; }

Property Value

string

ID

public int ID { get; }

Property Value

int

Instance

public virtual int Instance { get; }

Property Value

int

IsFlipH

Returns or sets if the shape flips Horizontal.false is default;

public bool IsFlipH { get; set; }

Property Value

bool

IsFlipV

Returns or sets if the shape flips Vertical.false is default;

public bool IsFlipV { get; set; }

Property Value

bool

IsGroup

This shape is group shape.

public bool IsGroup { get; }

Property Value

bool

IsInGroup

This shape is child shape of group shape.

public bool IsInGroup { get; }

Property Value

bool

IsLockAspectRatio

public bool IsLockAspectRatio { get; set; }

Property Value

bool

IsLocked

public bool IsLocked { get; set; }

Property Value

bool

IsMoveWithCell

protected bool IsMoveWithCell { get; set; }

Property Value

bool

IsPrintable

public bool IsPrintable { get; set; }

Property Value

bool

IsRelative

public bool IsRelative { get; set; }

Property Value

bool

IsRelativeResize

True means that is relative to original size of picture.

public bool IsRelativeResize { get; set; }

Property Value

bool

IsShortVersion

public bool IsShortVersion { get; set; }

Property Value

bool

IsSizeWithCell

protected bool IsSizeWithCell { get; set; }

Property Value

bool

IsSmartArt

public bool IsSmartArt { get; }

Property Value

bool

Left

public int Left { get; set; }

Property Value

int

LeftColumn

Left column.

public int LeftColumn { get; set; }

Property Value

int

LeftColumnOffset

Left column offset. 1024 means whole column offset

public int LeftColumnOffset { get; set; }

Property Value

int

Line

public IShapeLineFormat Line { get; }

Property Value

IShapeLineFormat

LinkedCell

Gets or sets the range linked to the shape's value.

public IXLSRange LinkedCell { get; set; }

Property Value

IXLSRange

Name

public string Name { get; set; }

Property Value

string

OnAction

public string OnAction { get; set; }

Property Value

string

Reflection

public IReflectionEffect Reflection { get; }

Property Value

IReflectionEffect

ResizeBehave

Specifies all possible settings for how drawing object shall be resized when the rows and columns between its start and ending anchor are resized or inserted(ComboBoxShape and CheckBoxShape and RadioButtonShape set MoveAndResize type value is invalid)

public ResizeBehaveType ResizeBehave { get; set; }

Property Value

ResizeBehaveType

RichText

public IRichTextString RichText { get; }

Property Value

IRichTextString

RightColumn

Right column.

public int RightColumn { get; set; }

Property Value

int

RightColumnOffset

Right column offset.

public int RightColumnOffset { get; set; }

Property Value

int

Rotation

Returns or sets the rotation of the shape, in degrees.

public int Rotation { get; set; }

Property Value

int

Shadow

public IShadow Shadow { get; }

Property Value

IShadow

ShapeCount

public int ShapeCount { get; }

Property Value

int

ShapeId

public int ShapeId { get; set; }

Property Value

int

ShapeType

Type of shape , Read Only.

public ExcelShapeType ShapeType { get; set; }

Property Value

ExcelShapeType

TextFrame

public ITextFrame TextFrame { get; }

Property Value

ITextFrame

TextVerticalAlignment

public ExcelVerticalAlignment TextVerticalAlignment { get; set; }

Property Value

ExcelVerticalAlignment

ThreeD

public IFormat3D ThreeD { get; }

Property Value

IFormat3D

Top

public int Top { get; set; }

Property Value

int

TopRow

Top row.

public int TopRow { get; set; }

Property Value

int

TopRowOffset

Top row offset.256 means whole row offset

public int TopRowOffset { get; set; }

Property Value

int

UpdatePositions

public bool UpdatePositions { get; set; }

Property Value

bool

Visible

public bool Visible { get; set; }

Property Value

bool

VmlShape

public bool VmlShape { get; set; }

Property Value

bool

Width

Width of object.

public int Width { get; set; }

Property Value

int

Methods

ChangeLayer(ShapeLayerChangeType)

public void ChangeLayer(ShapeLayerChangeType changeType)

Parameters

changeType ShapeLayerChangeType

Clone(object)

Creates a clone of the current shape.

public object Clone(object parent)

Parameters

parent object

New parent for the shape object.

Returns

object

A copy of the current shape.

Clone(object, Dictionary<string, string>, Dictionary<int, int>, bool)

Creates a clone of the current shape.

public virtual IShape Clone(object parent, Dictionary<string, string> hashNewNames, Dictionary<int, int> dicFontIndexes, bool addToCollections)

Parameters

parent object

New parent for the shape object.

hashNewNames Dictionary<string, string>

Hashtable with new worksheet names.

dicFontIndexes Dictionary<int, int>

Dictionary with new font indexes.

addToCollections bool

Returns

IShape

A copy of the current shape.

Remove()

Removes object.

public void Remove()

SaveToImage(Stream)

Save shape to image.

public void SaveToImage(Stream fileStream)

Parameters

fileStream Stream

Output stream. It is ignored if null.

SaveToImage(string)

Save shape to image.

public void SaveToImage(string fileName)

Parameters

fileName string

Output file name.

Scale(int, int)

Scales the shape.

public void Scale(int scaleWidth, int scaleHeight)

Parameters

scaleWidth int

Width scale in percent.

scaleHeight int

Height scale in percent.

SetName(string)

public void SetName(string name)

Parameters

name string

SetParents()

protected virtual void SetParents()

SetTextEffect(PresetTextEffect, string)

public void SetTextEffect(PresetTextEffect effect, string text)

Parameters

effect PresetTextEffect
text string