Excel spreadsheet (XLSX) format parser written in pure Swift
Feature and bugfix release that makes the library compatible with more spreadsheet types. It also adds support for Comments
structure, which can be parsed with the new parseComments
API.
Many thanks to @grin, @GoldenJoe and @LiewLi for reporting and fixing issues in this release.
Closed issues:
parseDocumentPaths
has internal protection, but is needed by parseDocumentRelationships
#74 (GoldenJoe)Merged pull requests:
text
property when format is applied at the character level #72 (LiewLi)Bugfix release that improves compatibility with different spreadsheet types.
Thanks to @grin for reporting and fixing issues in this release.
All properties on struct Format
except fontId
and numberFormatId
are now optional.
New borderId
and fillId
properties on struct Format
.
fillId
and borderId
attributes missing from CoreXLSX.Format #65
Bugfix release that adds case externalLink
to Relationship.SchemaType
improving .xlsx compatibility.
This is a bugfix release with changes to the model API that improve compatibility with files containing formulas and varied shared strings formats.
Specifically:
struct Formula
added with a corresponding property on struct Cell
color
on struct Properties
became optionalproperties
on struct RichText
became optionalchartsheet
case added to enum Relationship
richText
on struct SharedStrings
became an array, not optionalparseWorksheet
#50
Formula
struct, fix other model types #61 (MaxDesiatov)XMLCoder
dependency to 0.5, fix SharedStrings
#60 (MaxDesiatov)This is a release with API additions and bug fixes.
This release of CoreXLSX can be integrated as a Swift 5 module if you're using Xcode 10.2, but support for Swift 4.2 and earlier Xcode 10 versions is also maintained.
Compatibility is improved for big files and files that internally contain namespaced XML. A few other previously reported compatibility issues are now fixed. Many thanks to everyone who reported the issues, the improvements in this release wouldn't be possible without your contribution!
Several properties on the model types became optional when there's no guarantee they are always available in files generated by different apps and tools.
Now you can parse style information from the archive with the new parseStyles()
function. Please refer to the Styles
model for more details. Please note that not all XLSX files contain style information, so you should be prepared to handle the errors thrown from parseStyles()
function in that case.
This is a release with API improvements and bug fixes. A big thank you to everyone who provided bug reports and contributions that made this release possible!
New parseSharedStrings
function on XLSXFile
allows you get values of cells with shared string value. Quite frequently those strings are unavailable and are only referenced in the original model types you get with parseWorksheet
.
Previously when addressing cells and columns you had to use a stringly-typed API. It was also not very convenient for specifying a range of columns. This is now fixed with the new type-safe ColumnReference
struct, which conforms to Comparable
and Strideable
.
Following the addition of an error context to XMLCoder
, which is the main dependency of CoreXLSX
, it is now exposed on struct XLSXFile
. Pass a non-zero value to errorContextLength
argument (default is 0
) of XLSXFile
initializer and you'll get a snippet of XML that failed to parse in the debug description of the error value.
Additional optional argument bufferSize
was added to XLSXFile
initializer as a response to previous
reports about problems with zip file extraction. The default value is 10 MiB, which seems to be enough in most cases, but you can still try passing a larger value for bigger files if you see that an XML file stops abruptly in the middle of the file. Unfortunately, we haven't found a good way to adjust this value dynamically based on the file size, but please let us know if you did.
Support for Carthage was added as well as support for tvOS and watchOS.
Some files that couldn't be previously parsed should now be handled better thanks to fixes in optionality and more properties added to the model types.
errorContextLength
on struct XLSXFile
(#38)
@MaxDesiatov
customProperties
relationship (#34)
@NSMutableString
Relationship.SchemaType
(#25)
@MaxDesiatov
public func parseDocumentRelationships
(#23)
@MaxDesiatov
Workbook
model with tests (#16)
@MaxDesiatov
columns
property optional on Worksheet
(#14)
@MaxDesiatov
worksheetCache
private property as unused (#11)
@MaxDesiatov
Strideable
on ColumnReference
(#5)
@MaxDesiatov
Refine README.md to include implementation details.
Refine code comments and links in README.md