CoreXLSX v0.10.0 Release Notes

Release Date: 2020-04-06 // almost 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:

    • officeDocument is misspelled in corePropreties Relationship (#95) via @mrkammoun
    • โž• Add cell type enum, date/sharedStrings helpers (#102) via @MaxDesiatov
    • ๐Ÿ‘‰ Make XLSXFile a class, not a struct (#100) via @MaxDesiatov
    • ๐Ÿ‘ Clarify lack of support for .xls files in README (#99) via @MaxDesiatov
    • Clarify Xcode 11 and Xcode 10 project details (#98) via @MaxDesiatov
    • โšก๏ธ Update dependencies to their latest versions (#96) via @MaxDesiatov
    • โšก๏ธ Update SwiftFormat settings, add pre-commit (#97) via @MaxDesiatov
    • ๐Ÿ›  Fix workbooks with no views, cleanup tests (#93) via @MaxDesiatov
    • ๐ŸŽ Test on Xcode 11.3 with macOS 10.15 (#92) via @MaxDesiatov
    • โšก๏ธ Update ZIPFoundation to 0.9.10 (#91) via @MaxDesiatov