Syncfusion.XlsIO.Base
Example 


ListFillRange Property

Gets or sets the worksheet range used to fill the specified list box.
Syntax
'Declaration
 
Property ListFillRange As IRange
'Usage
 
Dim instance As IComboBoxShape
Dim value As IRange
 
instance.ListFillRange = value
 
value = instance.ListFillRange
IRange ListFillRange {get; set;}
Example
The following code illustrates how to set the ListFillRange to load the data for the 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.1460.0.32

See Also