Skip to content

Commit

Permalink
[xlsb] add data validations
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Jun 18, 2024
1 parent d06c655 commit 45a666b
Show file tree
Hide file tree
Showing 4 changed files with 502 additions and 71 deletions.
21 changes: 21 additions & 0 deletions R/wb_load.R
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,17 @@ wb_load <- function(
)
}

for (i in seq_along(wb$worksheets)) {
if (!wb$is_chartsheet[[i]])
wb$worksheets[[i]]$extLst <-
stringi::stri_replace_all_fixed(
wb$worksheets[[i]]$extLst,
xti$name_id,
xti$sheets,
vectorize_all = FALSE
)
}

### for external references we need to get the required sheet names first
# For now this is all a little guess work

Expand Down Expand Up @@ -1648,6 +1659,16 @@ wb_load <- function(
vectorize_all = FALSE
)
}


if (!wb$is_chartsheet[[i]])
wb$worksheets[[j]]$dataValidations <-
stringi::stri_replace_all_fixed(
wb$worksheets[[j]]$dataValidations,
nri$name_id,
nri$name,
vectorize_all = FALSE
)
}

}
Expand Down
Loading

0 comments on commit 45a666b

Please sign in to comment.