Syncfusion.XlsIO.Base
Example 


LinkedCell Property (IComboBoxShape)

Gets or sets the worksheet range linked to the control's value.
Syntax
'Declaration
 
Property LinkedCell As IRange
'Usage
 
Dim instance As IComboBoxShape
Dim value As IRange
 
instance.LinkedCell = value
 
value = instance.LinkedCell
IRange LinkedCell {get; set;}
Example
The following code illustrates how to set LinkedCell to display the SelectedValue of combobox.
using Syncfusion.XlsIO;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Load data
            worksheet["J1"].Value = "1";
            worksheet["J2"].Value = "2";
            worksheet["J3"].Value = "3";
            
            //Add combobox
            IComboBoxShape combobox = worksheet.ComboBoxes.AddComboBox(2, 2, 20, 100);
            
            //Add combobox data
            combobox.ListFillRange = worksheet["J1:J3"];
            
            //Set linked cell
            combobox.LinkedCell = worksheet["D2"];
            
            //Set selected index
            combobox.SelectedIndex = 2;
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.2460.0.34

See Also