Syncfusion.XlsIO.Base
Example 


IndentLevel Property (IExtendedFormat)

Gets or set Indent level.
Syntax
'Declaration
 
Property IndentLevel As Integer
'Usage
 
Dim instance As IExtendedFormat
Dim value As Integer
 
instance.IndentLevel = value
 
value = instance.IndentLevel
int IndentLevel {get; set;}
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";
            worksheet["E2"].Text = "Sample";
            
            //Add style
            IStyle style = workbook.Styles.Add("CustomStyle");
            
            //Set style
            worksheet["C2"].CellStyle = style;
            
            //Set indent level
            style.IndentLevel = 2;
            
            //Get extended format
            IExtendedFormat format = worksheet["E2"].CellStyle;
            
            //Set indent level
            format.IndentLevel = 2;
            
            //Save and dispose
            workbook.SaveAs("CellFormats.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.2460.0.34

See Also