#
# Install Package: 'Cmd + Shift + B'
# Check Package: 'Cmd + Shift + E'
# Test Package: 'Cmd + Shift + T'
#
# Update documentation: devtools::document()
#
# Wrapper adding progress bar to xl_write method for lists
.xl_write_list_progress_wrapper = function(obj, wb, sheet, row = 1, col = 1, gap = 1, ...){
stopifnot(
is.numeric(gap),
length(gap)==1,
!is.na(gap),
gap>0
)
col_shift = 0
row_shift = 0
p <- dplyr::progress_estimated(length(obj)) # Added
for(each in obj){
p$tick()$print() # Added
res = expss::xl_write(each, wb = wb,
sheet = sheet,
row = row,
col = col,
...)
col_shift = max(col_shift, res[2])
row_shift = row_shift + res[1] + gap
row = row + res[1] + gap
}
invisible(c(row_shift - gap, col_shift))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.