CoreXLSX v0.10.0 Release Notes

Release Date: 2020-04-06 // about 4 years ago
  • 🛠 This is a release with bugfixes and a few improvements to usability of the spreadsheet cell values API. Thanks to all contributors and users, you provide an invaluable amount of feedback and help!

    🆕 New API:

    The library now provides a simplified API to fetch string and date values from cells, which is much easier to use than the previous 🔖 version (which is still available).

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

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

    📜 To parse a date value from a cell, use dateValue property on the Cell type:

    let columnCDates = worksheet.cells(atColumns: [ColumnReference("C")!])
      .compactMap { $0.dateValue }
    

    💥 Breaking change:

    The type property on Cell is no longer of String type. It was previously 👉 used to check if cell's type is equal to "s", which denoted a shared string. 🚀 You should use enum values for that since this release, which for shared strings now is (unsurprisingly) .sharedString.

    Closed issues:

    • 🏗 Xcode 11 installation and build (#90)
    • Reading Date values from cell (#89)
    • Can't open xml (#82)
    • Not able to read Numeric data from Sheet (#81)
    • Getting the value of a cell with number format? (#71)
    • Opening xlsx file Document Directory, Crashes (#52)

    🔀 Merged pull requests: