update_xlsx: Update an '.xlsx' file.

View source: R/update_xlsx.R

update_xlsxR Documentation

Update an .xlsx file.

Description

Update the content of an existing .xlsx file adding and removing rows in accordance to an identifier column. The content of the columns of variables not in idCol is dropped.

Usage

update_xlsx(newDat, filePath, sheetName, idCol)

Arguments

newDat

The new data.frame.

filePath

The path to the .xlsx file..

sheetName

The name of the sheet in the .xlsx file.

idCol

Name of the unique identifier column.

Details

This function is useful if, for example, a recode table or decision table is written to .xlsx but the underlying data structure changes. In such cases it might be useful to update the .xlsx table, this means removing no longer existing variables and adding rows for new variables. Use cases might be tables created by eatGADS::getChangeMeta() or eatFDZ::reverse_check_docu().

Value

A list or a data.frame.

Examples

# tbd


beckerbenj/eatAnalysis documentation built on July 7, 2023, 5:51 p.m.