Skip to content

Commit

Permalink
[update_table] guard against unknown xml nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Sep 30, 2023
1 parent fce93e8 commit 8946449
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions R/class-workbook.R
Original file line number Diff line number Diff line change
Expand Up @@ -2399,6 +2399,15 @@ wbWorkbook <- R6::R6Class(

xml <- wb_tabs$tab_xml
tab_nams <- xml_node_name(xml, "table")
known_xml <- c("autoFilter", "tableColumns", "tableStyleInfo")
tab_unks <- tab_nams[!tab_nams %in% known_xml]
if (length(tab_unks)) {
msg <- paste(
"Found unknown table xml nodes. These are lost using update_table: ",
tab_unks
)
warning(msg)
}

tab_attr <- xml_attr(xml, "table")[[1]]
tab_attr[["ref"]] <- dims
Expand Down

0 comments on commit 8946449

Please sign in to comment.