-
Notifications
You must be signed in to change notification settings - Fork 0
04 Maintenance & Repairs
See Notion for Overview
TODO: document
datalab/19_inputStepInjector.js/mainInputStepExtender()
For the 2020 Index, the functionality to repair / update / extend Input Spreadsheets has been redesigned. The Pilot's module has been deprecated.
Maintenance of NamedRanges, Labels, and Formatting is now enabled by the
-
mainInspectInputSheets()
Caller & the70_inspectSpreadsheets.js
Module (--> Documentation), and -
mainRepairInputSheets()
& thedoRepairsOnly
flags in the10_inputInterface.js
Module and Submodules (--> Documentation)
Important:
mainRepairInputSheets()
has to be executed withdata@
if sheets are locked/protected
mainRepairInputSheets()
calls processInputSpreadsheet()
and therefore follows the same logic as the regular Input Spreadsheets process. Based on the doRepairsOnly
flag, every subcomponent which usually would manipulate non-label Cells with Cell.setValue(cellValue : string)
is skipped. Everything else is updated from scratch, incl. the re-assignment of Named Ranges.
One exemption to
.setValue()
are subcomponents which do not require user input (such as the automated year-on-year comparison).\n\nIn theory, the logic could be extended to also update N/A-hardcoded cells, since these are more or less guaranteed to be correct.
After processInputSpreadsheet()
has succefully finished updating the File, processCompanyHealth()
is run to verify that no ranges are broken anymore.
- similar logic like updating
- utilises the 'addNewStep' flag in combination with
startAtMainStepNr
andConfig.subsetMaxStep: MainStepNr
-
mainInputSheets()
calls the regular Input Sheets routine, but skips previous Main Steps <startAtMainStepNr
- process then fetches
IndicatorSheet.getLastRow()
and addsn
Main Steps defined by[startAtMainStepNr, Config.subsetMaxStep]
In theory, this Logic can also be used to update only specific main steps. I.e. combined with
filterSingleIndicator(indicatorsVector, "G2")
one could update only F1, Step 2 for all companies.\n\n Important:mainRepairInputSheets()
has to be executed withdata@
if sheets are locked/protected