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.
Relationships
Nested Types
Cell.Formula
Conforms To
Codable
Equatable
Properties
reference
let reference: CellReference
type
let type: CellType?
styleIndex
let styleIndex: Int?
inlineString
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?
dateValue
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
stringValue(_:)
func stringValue(_ sharedStrings: SharedStrings) -> String?
Returns a string value for this cell, potentially loading a shared string value from a
given sharedStrings
argument.
richStringValue(_:)
func richStringValue(_ sharedStrings: SharedStrings) -> [RichText]
Returns a value of this cell as a RichText, from a given sharedStrings
argument.