Table of Contents

XlsFile.SetObjectProperties Method

Sets all the properties of the shape. This allows for more complete control than ExcelFile.SetObjectProperty(Int32, String, TShapeOption, String) beause it can specify for example a xlsx fill using a theme color, instead of simple RGB fills.

Syntax

Namespace: FlexCel.XlsAdapter

public override void SetObjectProperties(Int32 objectIndex, String objectPath, TShapeProperties shapeProperties, Boolean applyAnchor)

Parameters

<-> Parameter Type Description
objectIndex Int32 Index of the object (1-based)
objectPath String Index to the child object you want to change the property.
If it is a simple object, you can use String.Empty here, if not you need to get the ObjectPath from ExcelFile.GetObjectProperties(Int32, Boolean)
If it is "absolute"(it starts with "\"), then the path includes the objectIndex, and the objectIndex is not used. An object path of "\1\2\3" is exactly the same as using objectIndex = 1 and objectPath = "2\3"
shapeProperties TShapeProperties All the properties of the object. You will normally get this value from ExcelFile.GetObjectProperties(Int32, Boolean) and then replace the values you want.
applyAnchor Boolean If true, the anchor of the shape properties will be copied too. If false, the anchor won't change.
False can be used when you want to copy the properties from one object to another, but keep the positions.

See also