<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCell/stringValue",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCell(py)stringValue"
  },
  "title" : "stringValue"
}
-->

# stringValue

The cell’s value as a string.

```
var stringValue: String { get set }
```

## Discussion

This property uses the [`objectValue`](/documentation/AppKit/NSCell/objectValue) property to access the actual value. If no formatter is assigned to the cell or if the formatter cannot “translate” a new string appropriately, the cell is flagged as having an invalid object. If the cell’s object is not an <doc://com.apple.documentation/documentation/Foundation/NSString> object or cannot be converted to one, this property contains an empty string. If the cell is not a text-type cell, this method converts it to one before setting the object value.

If you use a class that has an [`attributedStringValue`](/documentation/AppKit/NSCell/attributedStringValue) property, the cell gets the string from that property instead of this one.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)