Our column-format looks like this: '0.00%'
We are setting the format via CmdFormat.Number.Format or with SetFloatValue(...)
But the AutoWidthCol-function does not respect our userformat.
Because of this, the calculated width is to small to fit the values with our numberformat.
I´ve found out, that the GetAsFmtString-function, which is used in .AutoWidthCol, returns for example '1' instead of '100.00%'.
I think the origin of that error is in TExcelMask.SetMask(Value).
"Value" contains our number-format ('0.00%').
At the beginning of the function the Value-parameter gets cleaned up. (It removes some special characters)
But after that the Value gets never used.
The "clean-up" is followed by this line:
Code: Select all
FMask := '@'; // Value;
If I replace that '@' with "Value" the autosizing works.
Now GetAsFmtString returns the correct value ('100.00%').
Can you please check that issue?