Syncfusion.XlsIO.Base
Example 


Text Property (ITextBox)

Text of the comment.
Syntax
'Declaration
 
Property Text As String
'Usage
 
Dim instance As ITextBox
Dim value As String
 
instance.Text = value
 
value = instance.Text
string Text {get; set;}
Example
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];
            
            //Add textbox
            ITextBox textbox = worksheet.TextBoxes.AddTextBox(5, 5, 40, 100);
            
            //Set text
            textbox.Text = "Text";
            
            //Set alignment
            textbox.HAlignment = ExcelCommentHAlign.Center;
            textbox.VAlignment = ExcelCommentVAlign.Center;
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.47

See Also