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 17, 2024
1 parent d06c655 commit 17099a2
Show file tree
Hide file tree
Showing 4 changed files with 499 additions and 71 deletions.
18 changes: 18 additions & 0 deletions R/wb_load.R
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,16 @@ wb_load <- function(
)
}

for (i in seq_along(wb$worksheets)) {
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 +1658,14 @@ wb_load <- function(
vectorize_all = FALSE
)
}

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 17099a2

Please sign in to comment.