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

# DefinedNameUtility

## Overview

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

Provides normalization and validation helpers for defined names.

This class declares 5 methods for DefinedNameUtility objects in C++ programs.
Available methods include: `IsReservedName`, `NormalizeComment`, `NormalizeFormula`, `NormalizeName`, `SameScope`.
Public members are accessible to any C++ application after installing the Aspose.Cells FOSS for C++ package.

## Methods

| Signature | Description |
|-----------|-------------|
| `IsReservedName(name: std::string_view)` → `bool` | Returns true if the given name matches one of the reserved built-in defined names (case-insensitive). |
| `NormalizeName(name: std::string_view)` → `std::string` | Trims and validates a defined name. Throws CellsException if the name is empty or is a reserved built-in name. |
| `NormalizeFormula(formula: std::string_view)` → `std::string` | Trims a formula, strips a leading '=' if present, and trims again. Throws CellsException if the result is empty. |
| `NormalizeComment(comment: std::string_view)` → `std::string` | Trims a comment and returns the result. |
| `SameScope(left: std::optional<int>, right: std::optional<int>)` → `bool` | Returns true when both scopes are absent or both are present with equal values. |

## See Also

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