Version
'~> 0.6.1'
Describe the bug
Error I'm getting when trying to load very basic spreadsheets:
error: valueNotFound(CoreXLSX.Fonts, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "fonts", intValue: nil)], debugDescription: "Expected Fonts value but found null instead.", underlyingError: nil))
To Reproduce
HelloWorld.xlsx
Blank.xlsx
Attaching two files which fail to load with the below code:
let f = Bundle.main.url(forResource: "Models.scnassets/levels/HelloWorld", withExtension: "xlsx")!
guard let file = XLSXFile(filepath: f.path) else {
fatalError("XLSX file corrupted or does not exist")
}
do {
let styles = try file.parseStyles()
let ws = try file.parseWorksheet(at: "xl/worksheets/sheet1.xml")
for row in ws.data?.rows ?? [] {
for c in row.cells {
print(c)
}
}
} catch CoreXLSXError.archiveEntryNotFound {
print("CoreXLSXError.archiveEntryNotFound")
} catch {
print("error: \(error)")
}
Expected behavior
The files should load and just ignore empty border/font tags similar to this:
<borders count="1"><border/></borders>
<fonts count="2"><font><sz val="10.0"/><color rgb="FF000000"/><name val="Arial"/></font><font/></fonts>
Version
'~> 0.6.1'
Describe the bug
Error I'm getting when trying to load very basic spreadsheets:
To Reproduce
HelloWorld.xlsx
Blank.xlsx
Attaching two files which fail to load with the below code:
Expected behavior
The files should load and just ignore empty border/font tags similar to this:
<borders count="1"><border/></borders><fonts count="2"><font><sz val="10.0"/><color rgb="FF000000"/><name val="Arial"/></font><font/></fonts>