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

Improve handling of non-region names in getNamedRegions and add related test #474

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

bescoto
Copy link

@bescoto bescoto commented Jun 6, 2019

Excel names don't need to point to regions, they may point to constants, such as 10000, or other names.
Currently getNamedRegions can skip these, causing the sheets and regions attributes not to line up with the names.
This patch just sets the sheet and region to "" (empty string) for the names like this.

heseber and others added 6 commits November 19, 2018 23:06
Some Excel files contain sheet names for veryHidden sheets that do not have any sheet content. Such sheets have an empty r:id. Their sheet names have to be skipped because otherwise there will be a misalignment between sheet names and sheet indeces.
…ed test

Excel names don't need to point to regions, they may point to constants, such as 10000, or other names.
Currently getNamedRegions can skip these, causing the sheets and regions attributes not to line up with the names.
This patch just sets the sheet and region to "" (empty string) for the names like this.
@codecov
Copy link

codecov bot commented Jun 6, 2019

Codecov Report

Merging #474 into master will increase coverage by 0.08%.
The diff coverage is 95.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #474      +/-   ##
==========================================
+ Coverage   60.23%   60.32%   +0.08%     
==========================================
  Files          30       30              
  Lines        7142     7155      +13     
==========================================
+ Hits         4302     4316      +14     
+ Misses       2840     2839       -1
Impacted Files Coverage Δ
R/wrappers.R 42.7% <100%> (+0.09%) ⬆️
R/readWorkbook.R 83.33% <100%> (+0.23%) ⬆️
R/helperFunctions.R 75.86% <100%> (+0.3%) ⬆️
R/loadWorkbook.R 69.97% <80%> (+0.41%) ⬆️

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 ead0038...11168d3. Read the comment docs.

@ycphs
Copy link
Contributor

ycphs commented Oct 8, 2019

I implemented your PR in my new fork of the repository https://github.com/ycphs/openxlsx

david-f1976 pushed a commit to david-f1976/openxlsx that referenced this pull request Nov 8, 2019
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.

3 participants