Syncfusion.XlsIO.Base
Example 


TextBoxes Property (ITabSheet)

Gets a ITextBoxes collection with all ITextBoxShape inside the sheet. Read-only.
Syntax
'Declaration
 
ReadOnly Property TextBoxes As ITextBoxes
'Usage
 
Dim instance As ITabSheet
Dim value As ITextBoxes
 
value = instance.TextBoxes
ITextBoxes TextBoxes {get;}
Example
The following code illustrates how to access ITextBoxes collection.
using Syncfusion.XlsIO;
using System;
            
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];
            
            //Add textbox
            ITextBoxShape textbox1 = worksheet.TextBoxes.AddTextBox(1, 1, 20, 100);
            ITextBoxShape textbox2 = worksheet.TextBoxes.AddTextBox(5, 5, 20, 100);
            
            //Set name
            textbox1.Name = "TextBox1";
            textbox2.Name = "TextBox2";
            
            //Get count
            Console.Write(worksheet.TextBoxes.Count);
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
            Console.ReadKey();
        }
    }
}
//Output will be
//2
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also