Shape.SetLinkedCell

Shape.SetLinkedCell method

Sets the range linked to the control’s value.

public void SetLinkedCell(string formula, bool isR1C1, bool isLocal)
ParameterTypeDescription
formulaStringThe range linked to the control’s value.
isR1C1BooleanWhether the formula needs to be formatted as R1C1.
isLocalBooleanWhether the formula needs to be formatted by locale.

Examples

using System;
using Aspose.Cells;

namespace AsposeCellsExamples
{
    public class ShapeMethodSetLinkedCellWithStringBooleanBooleanDemo
    {
        public static void Run()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];

            // Add a scrollbar shape
            Aspose.Cells.Drawing.Shape scrollBar = worksheet.Shapes.AddScrollBar(2, 0, 2, 0, 130, 30);

            // Link the scrollbar value to cell A12
            scrollBar.SetLinkedCell("$A$12", false, true);

            // Save the workbook
            workbook.Save("SetLinkedCellDemo.xlsx");
        }
    }
}

See Also