Cell IndentLevel to left indent in inches

@deivydasr,
We are analysing your requirement and will share our feedback soon.

Hello @ahsaniqbalsidiqui

Did you have some time to investigate this?

@deivydasr,
Thank you for contacting Aspose support again. This issue is in the queue and still pending due to little complexity. We will write back here as soon as some feedback is ready to share.

@deivydasr,

If you want to get the size of 4 indents, please simply use the following line of code:
CellsHelper.getTextWidth(" ", workbook.getDefaultStyle().getFont(), 1)

@Amjad_Sahi

Thank you for your reply!
Could you explain what is in " " and how did you came up with this value between quotation marks?

@deivydasr,

Well, space b/w double quotes refers to the number of indent(s), See the following sample code with comments for your reference:
e.g
Sample code:

Workbook workbook = new Workbook("f:\\files\\GetTextWidthSample.xlsx");
		System.out.println("4 indents size: " + CellsHelper.getTextWidth("    ", workbook.getDefaultStyle().getFont(), 1));

output:

4 indents size: 9.75

PS. I place “4” spaces b/w “”.

@Amjad_Sahi
Thank you for the example.
Still the behavior of this is unclear.

CellsHelper.getTextWidth(" ", workbook.getDefaultStyle().getFont(), 1) returns 3.75 for Calibri 11 size default font, where with the same settings in excel, 1 indentation level seems to be around 7pt.
See attached files for example.
IndentationExample.zip (22.5 KB)

@deivydasr,

Thanks for the sample files and code segment.

We will check and get back to you soon.

@deivydasr,
We are sorry for confusion. One indent should be same as 3 spaces.
So the codes should be:

CellsHelper.getTextWidth(" ", workbook.getDefaultStyle().getFont(), 1)

@ahsaniqbalsidiqui
Could you explain what the scaling means? Documentation lacks an explanation for it.
Also, why the 6 spaces getTextWidth result is not equal to (3 spaces result) x 2?

Besides this, I have tried one more time to calculate the text witdh and with 2 spaces I get 6.75 points while with 3 spaces 9.75.
Style font - Calibri 11pt

@deivydasr,
Please spare us little time as we are analyzing your query and will share our feedback soon.

@deivydasr,

For your queries,
1). Could you explain what the scaling means?
Please simply set scaling as 1 now. We will try to support measuring the size of the string in printing view later on.

2). why the 6 spaces getTextWidth result is not equal to (3 spaces result) x 2?
There is an interval between each character.