Skip to content

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

Open
bescoto wants to merge 8 commits intoawalker89:masterfrom
bescoto:master
Open

Improve handling of non-region names in getNamedRegions and add related test#474
bescoto wants to merge 8 commits intoawalker89:masterfrom
bescoto:master

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