Syncfusion.XlsIO.Base
Example 


AutoSize Property

True if the size of the specified object is changed automatically to fit text within its boundaries. Read/write Boolean.
Syntax
'Declaration
 
Property AutoSize As Boolean
'Usage
 
Dim instance As IComment
Dim value As Boolean
 
instance.AutoSize = value
 
value = instance.AutoSize
bool AutoSize {get; set;}
Example
The following code illustrates how to set AutoSize property.
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 comment
            IComment comment = worksheet["C2"].AddComment();
            
            //Add text
            comment.Text = "Comment";
            
            //Set auto size
            comment.AutoSize = true;
            
            //Save and dispose
            workbook.SaveAs("Comments.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.32

See Also