Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dims are not converted in wb_add_image() #952

Closed
olivroy opened this issue Feb 20, 2024 · 1 comment · Fixed by #953
Closed

dims are not converted in wb_add_image() #952

olivroy opened this issue Feb 20, 2024 · 1 comment · Fixed by #953

Comments

@olivroy
Copy link
Collaborator

olivroy commented Feb 20, 2024

Looks like you found a bug. We never convert to dims in wb_add_image():

openxlsx2/R/class-workbook.R

Lines 4915 to 4922 in ee3590b

if ((exists("start_row") && !is.null(start_row)) ||
(exists("start_col") && !is.null(start_col))) {
if (!exists("start_row") || is.null(start_row)) start_row <- 1
if (!exists("start_row") || is.null(start_col)) start_col <- 1
.Deprecated(old = "start_col/start_row", new = "dims", package = "openxlsx2")
start_col <- col2int(start_col)
start_row <- as.integer(start_row)
}

Should be a simple fix using dims and wb_dims().

Originally posted by @JanMarvin in #948 (reply in thread)

@olivroy olivroy changed the title dims are not converted in wb_add_image(): dims are not converted in wb_add_image() Feb 20, 2024
@JanMarvin
Copy link
Owner

Thanks for tracking. I've opened a PR in #953. It's a tad bit sad that we have to fix a deprecated call, instead of removing it, but that's life.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants