I have been reading over aspose cells to see if it meets our needs for excel creation. One of the spreedsheets we need to create will need to look like a tree. To do this, I was looking at the IndentLevel property to set an indentation level for each level of the tree. When I saw how much 1 indentation level looks like, I thought I would increment by 2 for each level to make the levels more visually distinct. If I were to do this, I may exhaust the IndentLevel limit since it is limited to 15. Why is it limited to 15?
Hi,
Aspose.Cells follows MS Excel standards, if MS Excel allows this, then Aspose.Cells would also allow this. Could you provide us your sample code and sample Excel file(s) here to show the issue. Also, provide an Excel file that you may manually create in MS Excel having your desired indent level set for cells formattings, save the file and provide it here. We will check your issue soon.
Thank you.
I was reading the documentation here http://www.aspose.com/docs/display/cellsnet/IndentLevel+Property that stated the limit was 15, so I assumed that was correct.
I just tested the following code to see if it would behave:
for(int i = 1; i <= 17; i++)
{
Cell cell = sheet.Cells[i, 0];
cell.PutValue(“Cell Text”);
Style indentStyle = new Style();
indentStyle.IndentLevel = i;
cell.SetStyle(indentStyle, true);
}
and it appears to work fine. The generated PDF had indention levels all the way to 17 as you can see in the screenshot I attached. Perhaps the documentation is out-of-date/incorrect?
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
Your findings are correct. The indent level limit is same as that of MS-Excel. Aspose.Cells can indent upto 250 levels. We have also updated the documentation.