Closed DavisVaughan closed 6 years ago
Merging #412 into master will increase coverage by
0.35%
. The diff coverage is80.95%
.
@@ Coverage Diff @@
## master #412 +/- ##
==========================================
+ Coverage 60.23% 60.59% +0.35%
==========================================
Files 30 30
Lines 7031 7156 +125
==========================================
+ Hits 4235 4336 +101
- Misses 2796 2820 +24
Impacted Files | Coverage Δ | |
---|---|---|
R/helperFunctions.R | 75.56% <100%> (+0.62%) |
:arrow_up: |
R/worksheet_class.R | 72.93% <50%> (-0.72%) |
:arrow_down: |
src/load_workbook.cpp | 89.85% <66.66%> (-0.3%) |
:arrow_down: |
R/loadWorkbook.R | 69.56% <75%> (-0.02%) |
:arrow_down: |
R/wrappers.R | 44.34% <80.89%> (+2.7%) |
:arrow_up: |
R/WorkbookClass.R | 55.56% <84.61%> (+0.3%) |
:arrow_up: |
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 025605f...c69f202. Read the comment docs.
Need to refactor on top of #413 rather than #411. Use the hashPassword() helper function. Waiting for that PR to be accepted before doing the refactoring in case anything else changes.
Hi,
Sorry to bother you. I noticed there is some work being done (or completed) on protecting the excel sheet. I'm specifically interested in the protectRange functionality. Is there a dev version I use? or better still, when is the release version expected?
Thank you for your great work! Sorry if this information is located elsewhere.
Kind regards,
OIiver
@olangfor I just closed and reopened this in #421 with a proper implementation now that #413 has been merged. Installing that PR should work if you need it immediately.
This PR implements the
protectRange()
function. It should be incorporated alongside #411. It protects an Excel range so that when a worksheet is protected withprotectWorksheet()
, specific ranges are still editable with or without a password specific to that range.There are no checks that the
range
is in a correct Excel format. If an incorrect format is supplied, upon opening the Excel workbook Excel will complain and ask if you want to remove the faulty XML. If you say yes, it will remove the protected range (in fact I think it removes all of them?).It is meaningful for overlapping ranges to be protected with multiple passwords. See the documentation Details section for more info.
I see this PR being useful when creating data entry templates with R. A data scientist could create a boxed off "holy grail" sheet / range where an analyst can enter data and then pass it back to the data scientist for further munging. The protection prevents the analyst from entering data in cells that could cause the data scientist issues.
CC @kainhofer