CoreXLSX Documentation Beta

Structure Cell

public struct Cell: Codable, Equatable

The representation of a spreadsheet cell. More details of how cells are encoded in .xlsx internals are available at wiki.ucl.ac.uk.

%3 Cell Cell Codable Codable Cell->Codable Equatable Equatable Cell->Equatable

Nested Types

Cell.Formula

Conforms To

Codable
Equatable

Properties

reference

let reference: CellReference

type

let type: CellType?

style​Index

let styleIndex: Int?

inline​String

let inlineString: InlineString?

Not every string in a cell is an inline string. You should use stringValue(_: SharedStrings) on the Cell type, supplying it the result of parseSharedStrings() called on your XLSXFile instance first. If any of those calls return nil, you can then attempt to look for the value in inlineString or value properties.

formula

let formula: Formula?

value

let value: String?

date​Value

var dateValue: Date?

Returns a date value parsed from this cell in the OLE Automation Date format. As this format doesn't encode time zones, current user's time zone is used, which is taken from TimeZone.autoupdatingCurrent.

Methods

string​Value(_:​)

func stringValue(_ sharedStrings: SharedStrings) -> String?

Returns a string value for this cell, potentially loading a shared string value from a given sharedStrings argument.

rich​String​Value(_:​)

func richStringValue(_ sharedStrings: SharedStrings) -> [RichText]

Returns a value of this cell as a RichText, from a given sharedStrings argument.

format(in:​)

func format(in styles: Styles) -> Format?

Returns a Format value applied to this cell, if any.

font(in:​)

func font(in styles: Styles) -> Font?

Returns a Font value applied to this cell, if any.