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

Number format read fix #741

Merged
merged 3 commits into from
Dec 12, 2020
Merged

Number format read fix #741

merged 3 commits into from
Dec 12, 2020

Conversation

artiz
Copy link
Contributor

@artiz artiz commented Dec 9, 2020

PR Details

We are using excelize in our ETL project to parse variety XLSX files from our customers and had found that some XLSX files generated by ERP systems contain incorrect number format definitions that leads to panic in excelize library.

We have added safety check to avoid panic on XSLX file read

How Has This Been Tested

Added new UT with example file

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.

@codecov-io
Copy link

codecov-io commented Dec 9, 2020

Codecov Report

Merging #741 (a96ed3e) into master (95d8920) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #741      +/-   ##
==========================================
+ Coverage   96.70%   96.71%   +0.01%     
==========================================
  Files          31       31              
  Lines        8581     8583       +2     
==========================================
+ Hits         8298     8301       +3     
+ Misses        161      160       -1     
  Partials      122      122              
Impacted Files Coverage Δ
cell.go 97.88% <100.00%> (+0.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95d8920...a96ed3e. Read the comment docs.

@xuri xuri added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 10, 2020
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.

Hi @artiz, thanks for your PR. I've left some comments.

cell.go Show resolved Hide resolved
cell_test.go Outdated Show resolved Hide resolved
cell_test.go Show resolved Hide resolved
cell_test.go Outdated Show resolved Hide resolved
crypt_test.go Outdated Show resolved Hide resolved
@artiz artiz requested a review from xuri December 11, 2020 21:22
@xuri xuri merged commit 61057c5 into qax-os:master Dec 12, 2020
@xuri
Copy link
Member

xuri commented Dec 12, 2020

LGTM, thanks for your PR.

jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this pull request Oct 22, 2023
* fix UT-generated file names to be ignored
* fix cell value load with invalid number format ID
* fix PR issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants