Hi, I have a question regarding how to apply custom formats to excel cell strings.
I have a custom format such as this: (#,##0);(#,##0);(-);(@)
This custom format basically says:
- if the numeric value is positive, add a trailing space
- if the numeric value is negative, display using brackets
- if the cell is a text string, add a trailing space
As you can see with the screenshot I attached, in Excel, they align perfectly, with the first 3 values each have a trailing space, while the forth value has an end bracket. When I use Aspose to extract each of these values and put them into a Word table, I cannot get them to align. For the negative values, Aspose.Cells.Cell gives me the StringValue “(55,555)” that is exactly what I see on the UI, however, for the string value “TEXT”, Cell.StringValue only gives me “TEXT”, intead of "TEXT " with a trailing space. (The same problem existed for the positive numbers, for which I had to manually add a trailing space)
I also tried c.SetStyle() call, and I still do not see the StringValue reflecting what I see on the UI. How can I get the string that has been custom formatted?
Any help would be appreciated.