We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Public Property IndentLevel As Integer

Is it possible to extend the limit for the IndentLevel to 50?

We may experience indents larger than 15.

Unfortunately the answer is no. That’s limited by MS Excel. You can find that in MS Excel you can only set max indent level to 15.

Aspose.Cells has replaced Aspose.Excel which is no more under development and discontinued now. You can perform all the tasks which were supported by the previous product as well as avail the latest features available in the recent MS Excel. You can set the indentaion using this new product also as shown in the following code segment. Please note that this new product also follows the rules of MS Excel therefore maximum indentation level is still 15.

// Instantiating a Workbook object
Workbook workbook = new Workbook();

// Obtaining the reference of the worksheet
Worksheet worksheet = workbook.Worksheets[0];

// Accessing the "A1" cell from the worksheet
Aspose.Cells.Cell cell = worksheet.Cells["A1"];

// Adding some value to the "A1" cell
cell.PutValue("Visit Aspose!");

// Setting the horizontal alignment of the text in the "A1" cell
Style style = cell.GetStyle();
// Setting the indentation level of the text (inside the cell) to 2
style.IndentLevel = 2;


// Saving the Excel file
workbook.Save(dataDir + "book1.out.xls", SaveFormat.Excel97To2003);

More details about indentation and configuring the alignment are available here:

You may download the latest version of the product here:
Aspose.Cells for .NET (Latest Version)

If you want to test the product feature easily, please download the ready to run solution here which contains hundreds of examples to demonstrate the exciting features of this product.