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

Update checkSheet GetTables error: index out of range #1692

Merged
merged 5 commits into from
Nov 18, 2023

Conversation

lujin1
Copy link
Contributor

@lujin1 lujin1 commented Oct 17, 2023

PR Details

Description

Related Issue

Motivation and Context

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@lujin1 lujin1 changed the title Update checkSheet Update checkSheet GetTables error: index out of range Oct 17, 2023
@lujin1
Copy link
Contributor Author

lujin1 commented Oct 17, 2023

When the sheet does not start with table, an error will be reported when getting tables.

Copy link
Member

@xuri xuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR. Could you add unit tests for this changes?

@xuri xuri added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 17, 2023
@tumbleweedd
Copy link

When the sheet does not start with table, an error will be reported when getting tables.

Could you please provide the test file that caused the panic? I will be very grateful

@xuri
Copy link
Member

xuri commented Nov 18, 2023

Hi @tumbleweedd, I have already analytics and created a the special case workbook file can be reproduce this problem, but the fix in this changes will be cause the some cell value was missing, I think we need to made some change based on this.

- Fix panic on read workbook with internal row element without r attribute
- Update the unit tests
@xuri xuri added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 18, 2023
@xuri xuri linked an issue Nov 18, 2023 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (57faaf2) 99.04% compared to head (908f931) 99.04%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1692   +/-   ##
=======================================
  Coverage   99.04%   99.04%           
=======================================
  Files          32       32           
  Lines       28385    28400   +15     
=======================================
+ Hits        28115    28130   +15     
  Misses        179      179           
  Partials       91       91           
Flag Coverage Δ
unittests 99.04% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xuri xuri added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 18, 2023
Copy link
Member

@xuri xuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for your contribution. I have made some changes based on your branch. This feature will be released in the next version.

@xuri xuri merged commit 6220a79 into qax-os:master Nov 18, 2023
39 checks passed
@xuri
Copy link
Member

xuri commented Mar 13, 2024

According to the benchmark report of v2.8.1, the fix slows down the get rows about 3 times, and memory using about 17 times. We need to fixed the performance impact later.

ha5ky pushed a commit to ha5ky/excelize that referenced this pull request Mar 15, 2024
xuri pushed a commit that referenced this pull request Mar 15, 2024
Co-authored-by: chun.zhang2 <chun.zhang2@geely.com>

- This fix speed slowdown and memory usage increase base on the reverts commit 6220a79
- Fix panic on read workbook with internal row element without r attribute
- Update the unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic: runtime error: index out of range [0] with length 0
4 participants