Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot initialize SchemaType from invalid String value http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml #87

Closed
mxcl opened this issue Nov 6, 2019 · 6 comments · Fixed by #88
Assignees
Labels
bug Something isn't working

Comments

@mxcl
Copy link

mxcl commented Nov 6, 2019

Version
0.9.0

Describe the bug
Parsing a spreadsheet from a customer throws this error. I can provide a sanitized version if required, but looking over the code, it seems like this is just an omitted type from Relationships.swift.

@MaxDesiatov
Copy link
Collaborator

@mxcl thanks, a sanitized version would be greatly appreciated! It would allow us to keep the test coverage at the same level after new case customXml is added 👍

@mxcl
Copy link
Author

mxcl commented Nov 6, 2019

jewelershealthcare.com-census (1).xlsx

Attached.

@mxcl
Copy link
Author

mxcl commented Nov 6, 2019

Code is:

guard let file = XLSXFile(filepath: path) else {
    throw GeneralError.corruptSpreadsheet
}
let sharedStrings = try file.parseSharedStrings()
try file.parseWorksheetPaths().flatMap { path in
    let ws = try file.parseWorksheet(at: path)  // throws here
}

@MaxDesiatov
Copy link
Collaborator

@mxcl thanks, hope you also don't mind if the file is committed to the repository as a part of the test suite? (asking explicitly just in case)

@MaxDesiatov MaxDesiatov added the bug Something isn't working label Nov 6, 2019
@mxcl
Copy link
Author

mxcl commented Nov 7, 2019

nps, sure thing and thanks for the fix!

@MaxDesiatov
Copy link
Collaborator

@mxcl thank you, this will be released as 0.9.1 tomorrow 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants