CoreXLSX Documentation Beta

Structure Shared​Strings

public struct SharedStrings: Codable, Equatable

Strings in spreadsheet internals are frequently represented as strings shared between multiple worksheets. To parse a string value from a cell you should use stringValue(_: SharedStrings) function on Cell together with parseSharedString() on your XLSXFile instance.

Here's how you can get all strings in column "C" for example:

if let sharedStrings = try file.parseSharedStrings() {
  let columnCStrings = worksheet.cells(atColumns: [ColumnReference("C")!])
    .compactMap { $0.stringValue(sharedStrings) }
}

Corresponding attributes and nodes that map to the properties of SharedStrings are documented in Microsoft docs.

%3 SharedStrings SharedStrings Equatable Equatable SharedStrings->Equatable Codable Codable SharedStrings->Codable

Nested Types

SharedStrings.Item

Conforms To

Codable
Equatable

Properties

unique​Count

let uniqueCount: UInt?

items

let items: [Item]