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

proof-of-concept decode XLS from ByteString #8

Closed
wants to merge 7 commits into from

Conversation

olafklinke
Copy link
Collaborator

I added two functions to decode a ByteString. The function decodeXlsByteString is just a wrapper around decodeXlsIO as suggested by Erik Rybakken. The function decodeXlsByteString' makes use of the libxls function that can open buffers. The latter is experimental and when proven to work properly should replace the former. Since this is my first FFI project, someone please review the definition of Data.Xls.toCBuffer and the Storable XLSError instance. Specifically, how does one determine the correct sizeOf a C enum? On my machine, sizeof(xls_error_t) returns 4 with gcc, but that might be different with different compiler/architecture combinations.

@olafklinke
Copy link
Collaborator Author

My branch further changes the return type of decodeXlsIO to be more structured than list of lists of strings. Since while decoding there is type information on the cell available, there is no reason we should not expose that in the library. This ought to make downstream processing beyond xls2csv more convenient.

@harendra-kumar
Copy link
Owner

@olafklinke thanks for the PR. I will take a look at it on the weekend.

@olafklinke
Copy link
Collaborator Author

I neglected that the test suite needs adjustments, too. Will file new PR.

@olafklinke olafklinke closed this Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants