You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unable to parse file with parseWorkbooks() decoding error
Code
import CoreXLSX
let filepath = "./Res_Inclu_TOU_Current.xlsx"
guard let file = XLSXFile(filepath: filepath) else {
fatalError("XLSX file at \(filepath) is corrupted or does not exist")
}
for wbk in try file.parseWorkbooks() {
for (name, path) in try file.parseWorksheetPathsAndNames(workbook: wbk) {
if let worksheetName = name {
print("This worksheet has a name: \(worksheetName)")
}
let worksheet = try file.parseWorksheet(at: path)
for row in worksheet.data?.rows ?? [] {
for c in row.cells {
print(c)
}
}
}
}
Version
0.14.2
Description of the bug
Unable to parse file with parseWorkbooks() decoding error
Code
File for reproduction
Res_Inclu_TOU_Current.xlsx
Additional context
I had this working for a few years, but I guess something in the energy company's xlsx file generation changed.
Output
Swift/ErrorType.swift:200: Fatal error: Error raised at top level: Swift.DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "relationship", intValue: nil), XMLKey(stringValue: "1", intValue: 1), XMLKey(stringValue: "1", intValue: 1), CodingKeys(stringValue: "type", intValue: nil)], debugDescription: "Cannot initialize SchemaType from invalid String value http://schemas.microsoft.com/office/2020/02/relationships/classificationlabels", underlyingError: nil))
The text was updated successfully, but these errors were encountered: