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

Incorrect row count #41

Closed
Ordiel opened this issue Jun 24, 2022 · 5 comments
Closed

Incorrect row count #41

Ordiel opened this issue Jun 24, 2022 · 5 comments

Comments

@Ordiel
Copy link

Ordiel commented Jun 24, 2022

Hi

Frist of all thanks a lot for this software. I think I found a regression of #23.

Here is an image that shows the file I am using (2 sheets, both having contents on 2 by 2 Range A:1 - B:2, the rest of the file is empty. I even deleted all other rows and columns) and the place where I think the error is, is at OdsReader#311. The way I see it the error of incorrect cells count is being caused by the default behavior of just adding 100 row (numRow on line 312) causing my file being reported as having 103 rows when I call getLastRow() on it. I think the value of numRow should be set to 0 for that scenario.

image

As you can see at that point the values of numColumns and numRows are correctly describing the contents of that sheet on my file. I can and would like to do the MR, if you think that would be a valid fix. I'll start catching up with the CONTRIBUTING.md guidelines anyway.

Greetings

P.S: If my file is needed for further debugging, or any other info please let me know. I'll gladly provide it on any mean you need

Edit: I am using 1.4.0 version BTW

@github-actions
Copy link

Thanks for your report! Please ensure you have provided enough info in order to recreate the issue, including the problematic ODS File.' first issue

@Ordiel
Copy link
Author

Ordiel commented Jun 24, 2022

Thank you kind bot, here is the file then

smm.ods

@miachm
Copy link
Owner

miachm commented Jun 24, 2022

Hi @Ordiel !

The error of #23 was caused by Microsoft Excel. Excel has been one of my main headaches in this project because for some silly decisions they have taken. Nevertheless, that's not your case. According to the screenshot and also your own file metadata, you are using LibreOffice/6.4.7.2. I can say more, you are not even use the attribute "table:number-rows-repeated" in your file. So these lines of code should not be the problem.

So let me get it straight. The issue is, Is SODS reporting this file has 103 rows? I don't have java in this machine, so I didn't have the opportunity to test it myself yet.

@Ordiel
Copy link
Author

Ordiel commented Jun 24, 2022

I created PR#42 just in case. Please let me now if that works I tested it and it works for the given file

@Ordiel
Copy link
Author

Ordiel commented Jun 24, 2022

Oh, my bad, I am just seeing your comments after I added the one for the MR. Correct with version 1.4.0 its landing on line 312, which is adding another 100 rows to the row count on that file.

@miachm miachm closed this as completed Sep 13, 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

No branches or pull requests

2 participants