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
I'm having issues opening one excel that I've got. This is my excel version.
Steps to reproduce
My code is very simple just taking the lib for a spin as documented in the README:
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)")}}}
I get the following error:
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/2011/relationships/webextensiontaskpanes", underlyingError:nil)): file Swift/ErrorType.swift, line 2002020-12-0300:25:57.843915+0000 Budgets[19537:709926] 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/2011/relationships/webextensiontaskpanes", underlyingError:nil)): file Swift/ErrorType.swift, line 200
TLDR:
Cannot initialize SchemaType from invalid String value http://schemas.microsoft.com/office/2011/relationships/webextensiontaskpanes"
Creating a new file seems to work fine, so I copied my faulty file and started to remove stuff until I eventually got an empty one which still fails.
I guess worth mentioning is that I have an add-on on this document. But even after removing it it threw the same error.
I hope you guys with your deeper knowledge can see what's going on a lot faster than I can.
Thank you!
The text was updated successfully, but these errors were encountered:
Hi @nunogoncalves, thank you for reporting this issue. It should be an easy fix, and I'm going to create a PR with it later today. Would you mind if your file is used as a test case for it? If confirm you agree to it, it would be added to the repository and shared under the terms of the Apache 2.0 license. No pressure at all if you don't want that, I can create an isolated test case without it.
MaxDesiatov
changed the title
Cannot initialize SchemaType from invalid String value http://schemas.microsoft.com/office/2011/relationships/webextensiontaskpanes
Cannot initialize SchemaType from invalid String value
Dec 9, 2020
Hi!
Version
0.13.0
Description of the bug
I'm having issues opening one excel that I've got. This is my excel version.
Steps to reproduce
My code is very simple just taking the lib for a spin as documented in the README:
I get the following error:
TLDR:
Taking a look at
all the cases are expecting a
http://schemas.openxmlformats.org/officeDocument/2006/relationships/\
so I guess that might be the issue here?Expected behavior
Worksheets could be printed out.
File for reproduction
faulty_worksheet.xlsx.zip
Additional context
Creating a new file seems to work fine, so I copied my faulty file and started to remove stuff until I eventually got an empty one which still fails.
I guess worth mentioning is that I have an add-on on this document. But even after removing it it threw the same error.
I hope you guys with your deeper knowledge can see what's going on a lot faster than I can.
Thank you!
The text was updated successfully, but these errors were encountered: