Syncfusion.XlsIO.Base
Example 


IndentLevel Property (IRange)

Gets or sets the indent level for cell or Range.
Syntax
'Declaration
 
Property IndentLevel As Integer
'Usage
 
Dim instance As IRange
Dim value As Integer
 
instance.IndentLevel = value
 
value = instance.IndentLevel
int IndentLevel {get; set;}
Remarks
It can be from 0 to 15 for Excel 97-2003 and 250 for Excel 2007-2013.
Example
The following code illustrates how to set indent level for a IStyle.
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];
            
            //Set text
            worksheet["C2"].Text = "Sample";
            
            //Set indent level
            worksheet["C2"].IndentLevel = 2;
            
            //Save and dispose
            workbook.SaveAs("CellFormats.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also