Excel spreadsheet (XLSX) format parser written in pure Swift
Max Desiatov now works at apple. @Joannis is now the maintianer
Full Changelog: https://github.com/CoreOffice/CoreXLSX/compare/0.14.1...0.14.2
This is a patch release improving compatibility with different spreadsheet formats.
Closed issues:
extendedProperties
(#145)workbookmetadata
(#142)Merged pull requests:
purl.oclc.org
relationship schema type (#146) via @MaxDesiatov
googleWorkbookMetadata
case to relationships (#143) via @MaxDesiatov
test.yml
workflow (#144) via @MaxDesiatov
test.yml
workflow (#149) via @MaxDesiatov
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:
parseSharedStrings
return optional value (#122) via @MaxDesiatov
Closed issues:
intValue
(#137)Merged pull requests:
ColumnReference
by intValue
(#139) via @MaxDesiatov
SchemaType.webExtensionTaskPanes
(#138) via @MaxDesiatov
font(in:)
and format(in:)
functions (#135) via @MaxDesiatov
swift-doc
(#131) via @MaxDesiatov
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:
Merged pull requests:
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.
This is a bugfix release that resolves an issue with parsing cells that contain time values. Thanks to @mb812 for reporting it!
Closed issues:
file.parseWorksheetPathsAndNames()
wanna workbook: <#Workbook#>
(#113)Merged pull requests:
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:
Merged pull requests:
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:
Merged pull requests:
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:
Merged pull requests:
case customXml
to Relationship.SchemaType #88 (MaxDesiatov)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:
Fixed bugs:
text
#83
Closed issues:
Merged pull requests: