Search Results for

    Show / Hide Table of Contents

    XlsFile.SetShapeLinkedCell Method

    Links the shape or image to a cell, if the shape can be linked. To unlink the cell, make linkedCell null. Note that this method applies to shapes like a rectangle or circle, or images. To change the link of a forms object like a combobox or a radiobutton use ExcelFile.SetObjectLinkedCell instead.

    Remarks

    Images behave differently from shapes: A linked shape will change its text with the value of the cells. A linked image will change its image, to be an screenshot of the selected range. Finally, a linked object like a combobox you can get with ExcelFile.GetObjectLinkedCell will modify the selected item depending on the linked cell.

    Syntax

    Namespace: FlexCel.XlsAdapter

    public override void SetShapeLinkedCell(Int32 objectIndex, String objectPath, String linkedCell)

    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"
    linkedCell String Cell that will be linked to the shape. To unlink the shape, make this parameter null. Note that this can be a single cell like "A3", a simple rectangular range like A1:B4, or a name like "myName". You can't use a complex formula here like "A1&A2"

    See also

    • XlsFile
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com