---
Product: Aspose.Cells
Platform: cpp
Page Type: reference
Canonical URL: https://reference.aspose.org/cells/cpp/displaytextformattersupport
---

# DisplayTextFormatterSupport

## Overview

`DisplayTextFormatterSupport` is a class in Aspose.Cells FOSS for C++.

Internal helper methods for display-text formatting of numeric, text, and date/time values.

This class declares 17 methods for DisplayTextFormatterSupport objects in C++ programs.
Available methods include: `ContainsNumericPlaceholder`, `ConvertToDouble`, `DisplayTextFormatterSupport`, `EvaluateCondition`, `ExpandSectionPattern`, `GetAbsoluteNumericValue`, `IsNumericValue`, `ParseSections`, `SanitizeNumericSection`, `SelectDateTimeSection`, `SelectNumericSection`, `SelectTextSection`, and 5 additional methods.
Public members are accessible to any C++ application after installing the Aspose.Cells FOSS for C++ package.

## Methods

| Signature | Description |
|-----------|-------------|
| `DisplayTextFormatterSupport()` | Calls DisplayTextFormatterSupport on this DisplayTextFormatterSupport instance. |
| `SelectNumericSection(sections: std::vector<DisplayFormatSectionInfo>, numericValue: double, useAbsoluteValue: bool)` → `std::optional<DisplayFormatSectionInfo>` | Selects the appropriate numeric section from a parsed format code. Returns std::nullopt when sections is empty. |
| `SelectTextSection(sections: std::vector<DisplayFormatSectionInfo>)` → `std::optional<DisplayFormatSectionInfo>` | Selects the text section (fourth section, or first containing '@'). Returns std::nullopt if no text section is found. |
| `SelectDateTimeSection(sections: std::vector<DisplayFormatSectionInfo>)` → `std::optional<DisplayFormatSectionInfo>` | Selects the first non-empty date/time section (among the first three). Returns std::nullopt if all are blank. |
| `ParseSections(formatCode: std::string_view)` → `std::vector<DisplayFormatSectionInfo>` | Parses a format code into section descriptors. |
| `SplitSections(formatCode: std::string_view)` → `std::vector<std::string>` | Splits a format code on unquoted, unescaped semicolons. |
| `TryParseSectionCondition(section: std::string_view, conditionOperator: std::string, conditionValue: double)` → `bool` | Attempts to parse a condition (operator + value) from a section string. |
| `TryParseConditionToken(token: std::string_view, conditionOperator: std::string, conditionValue: double)` → `bool` | Attempts to parse a condition token such as ">=10". |
| `EvaluateCondition(conditionOperator: std::string_view, numericValue: double, conditionValue: double)` → `bool` | Evaluates a comparison between numericValue and conditionValue. |
| `ShouldUseAbsoluteValue(section: std::string_view, numericValue: double)` → `bool` | Determines whether the absolute value of a negative number should be used when formatting (i.e. the pattern has no explicit '-' sign). |
| `SanitizeNumericSection(section: std::string_view)` → `std::string` | Strips directive brackets, quote escapes, and placeholder characters from a numeric section, returning the cleaned string (edge-trimmed). |
| `StripDirectiveBrackets(section: std::string_view, preserveElapsedTokens: bool)` → `std::string` | Removes bracketed directive tokens from a section string. |
| `ContainsNumericPlaceholder(pattern: std::string_view)` → `bool` | Returns true if the pattern contains any numeric placeholder character. |
| `ExpandSectionPattern(pattern: std::string_view, valueText: std::string_view, replaceTextPlaceholder: bool)` → `std::string` | Expands a section pattern by replacing text placeholders and removing formatting escapes. |
| `IsNumericValue(value: CellValue)` → `bool` | Returns true if the CellValue holds a numeric type (int or double). |
| `ConvertToDouble(value: CellValue)` → `double` | Converts a numeric CellValue to double. Throws std::invalid_argument if the value is not numeric. |
| `GetAbsoluteNumericValue(value: CellValue)` → `CellValue` | Returns the absolute numeric value. Non-numeric values are returned unchanged. |

## See Also

- [Aspose.Cells — Enterprise API Reference](https://reference.aspose.com/cells/)