CoreXLSX Versions Save

Excel spreadsheet (XLSX) format parser written in pure Swift

0.14.2

1 year ago

What's Changed

New Maintainer

Max Desiatov now works at apple. @Joannis is now the maintianer

New Contributors

Full Changelog: https://github.com/CoreOffice/CoreXLSX/compare/0.14.1...0.14.2

0.14.1

2 years ago

This is a patch release improving compatibility with different spreadsheet formats.

Closed issues:

  • Cannot initialize SchemaType from invalid String value extendedProperties (#145)
  • Cannot initialize SchemaType from invalid String value workbookmetadata (#142)

Merged pull requests:

0.14.0

3 years ago

This release improves compatibility with different spreadsheet formats, simplifies cell font and formatting APIs, and drops support for Carthage. Additionally, Xcode 11.3 on macOS is now the oldest supported version for building CoreXLSX.

Breaking changes:

Closed issues:

  • Unable to sort columns by intValue (#137)
  • Cannot initialize SchemaType from invalid String value (#136)
  • Odd cell.s value (#134)
  • 0.13.0 not available on Cocoapods (#133)
  • Unable to read xlsx file (#130)
  • Increase speed of parsing? (#127)
  • .xlsx File not opening with XLSXFile() (#125)
  • Getting Data From a specific Worksheet (#124)
  • ArchiveEntryNotFound error (#121)
  • Printing an empty cell? (#118)
  • Handling encrypted spreadsheets? (#101)

Merged pull requests:

0.13.0

3 years ago

This is a bugfix release with breaking changes that make count property on MergeCells and all properties on Workbook.View optional. Many thanks to @Ethan-Chew and @robgtsoftware for reporting these issues!

Closed issues:

  • Printing Strings in a Column (#116)
  • File.parseWorksheet(at: path) dies (#94)

Merged pull requests:

0.12.0

3 years ago

The is a bugfix release with a breaking change, it makes size and font properties optional on the RichText.Properties type to improve compatibility with certain spreadsheets. Thanks to @Ethan-Chew for reporting this in #116.

0.11.1

3 years ago

This is a bugfix release that resolves an issue with parsing cells that contain time values. Thanks to @mb812 for reporting it!

Closed issues:

  • Error parsing cells with Time value (#114)
  • file.parseWorksheetPathsAndNames() wanna workbook: <#Workbook#> (#113)
  • XLSXFile not initialising when passing document directory path (#108)

Merged pull requests:

0.11.0

3 years ago

This is a feature release that enables compatibility with CryptoOffice for decrypting spreadsheets. Additionally, with 0.11.0 you can easily get worksheet names with a new parseWorksheetPathsAndNames function on XLSXFile and get rich text values from cells with a new richStringValue function on Cell.

Due to technical issues, Swift 5.0 CI job for Linux has been removed, so compatibility with Swift 5.0 on Linux can no longer be guaranteed. While CoreXLSX may continue to work with Swift 5.0 on Linux, please update to Swift 5.1 or later to avoid unexpected issues.

Thanks to @kobylyanets and @duodo2412 for their contributions to this release!

New APIs:

  • XLSXFile now provides a new initializer that takes an argument of Data type. This allows opening in-memory documents, the primary example being spreadsheets decrypted with CryptoOffice.

  • XLSXFile now has a new parseWorksheetPathsAndNames function that returns an array of worksheet names and their paths in a given workbook, while previously you had to use parseWorksheetPaths and match paths manually with results of the parseWorkbooks function.

  • Cell now has a richStringValue function that takes a result of the XLSXFile.parseSharedStrings function and produces an array of RichText values. This makes it easier to query rich text content from cells, while previously you had to match cell values against SharedStrings manually.

Breaking change:

Due to the introduction of the new XLSXFile.init(data:) initializer, the filepath property on XLSXFile no longer makes sense. This property was not used internally in any way and in-memory files don't have any filepaths. If you need to refer to a filepath of an .xlsx file after you've parsed from your filesystem, you should retain it manually and process it separately as you see fit.

Closed issues:

  • API for matching sheet names to sheet paths (#105)

Merged pull requests:

0.10.0

3 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:

0.9.1

4 years ago

This release adds a new value to the Relationship.SchemaType enum, which fixes compatibility with some spreadsheet files. Thanks to @mxcl for the bug report!

Fixed bugs:

  • Cannot initialize SchemaType from invalid String value #87

Merged pull requests:

0.9.0

4 years ago

This release adds Linux support and improves compatibility with .xlsx files that contain shared strings. Thanks to @CloseServer, @funnel20 and @LiewLi for bug reports and contributions!

Implemented enhancements:

  • Bump XMLCoder to 0.9.0, add CI jobs for Linux, Xcode 11 #86 (MaxDesiatov)

Fixed bugs:

  • Multi-line text in an Excel cell is parsed into single line in the SharedStrings property text #83

Closed issues:

  • I crashed while calling try file.parsesharedstrings() with an error #79

Merged pull requests: