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

Last row isn't parsed (xls) #22

Open
mschindlerMM opened this issue May 11, 2020 · 4 comments
Open

Last row isn't parsed (xls) #22

mschindlerMM opened this issue May 11, 2020 · 4 comments

Comments

@mschindlerMM
Copy link

It appears that the XLS parser is not parsing the last line of a sheet. Therefore, neither the count_rows nor the get_rows return the expected value. I have tried several XLS sheets and they are all getting parsed without the last line.

You can even reproduce that with your own test file (exoffice/test/test_data/test.xls). Sheet 1 has 23 rows, but count_rows returns 22. Sheet 2 has 10 rows, but count_rows returns 9.

@AlexKovalevych
Copy link
Owner

According to these tests everything works fine and the parser returns correct number of lines:

https://github.com/AlexKovalevych/exoffice/blob/master/lib/exoffice.ex#L85
https://github.com/AlexKovalevych/exoffice/blob/master/lib/exoffice.ex#L140

Did i miss something?

@mschindlerMM
Copy link
Author

Strange. I can only say that the tests mentioned do not return the expected result for me. We tried it on MacOs and Linux - both with the same flawed result.

Not sure what information I can give you that might be useful.

@AlexKovalevych
Copy link
Owner

I can only say that the tests mentioned do not return the expected result for me

So the tests are not passing on your machine? Since they passed on my machine (linux) and on travis https://travis-ci.org/github/AlexKovalevych/exoffice/builds/687345078 i can only guess why it is so. Maybe otp/elixir version difference or you can try to run them in docker (just to change environment) and see if it works. I've also tried several cases which are not represented in tests - each time they return correct number of lines.

@mschindlerMM
Copy link
Author

Seems like it won't work if you use the package as a dependency.

I cloned your repository and tested the parsing there ... and it worked. Then I created a new dummy project and installed the package as a dependency ... and this result was unfortunately wrong again (same thing as already explained in the issue).

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

No branches or pull requests

2 participants