Is it possible to adjust position of an inserted image with openxlsx?

Hello everyone,

I've created an excel template for reporting. In the excel file, there will be some images. I'm able to insert the images by using openxlsx package.

test.fpath <-'Templates/CB.xlsx'
wb <- openxlsx::loadWorkbook(test.fpath)
insertImage(wb, sheet = 1, file = "tm_player_image.png",startRow = 8,  startCol = 3, width = 1.1, height = 1.73, units = "in")
saveWorkbook(wb, file = "createWorkbookExample.xlsx", overwrite = TRUE)

openxlsx package allows you to set specific value for starting row and column. When I run the script, excel file is saved like the following image.

Ekran Resmi 2022-11-25 13.48.51

However, I don't want the image start row = 8 and col = 3. I should able to drag the image where ever I want and define top-left position values. Is there any way to achieve this?

Ekran Resmi 2022-11-25 13.49.03

I need to define position of the image like this.

Left (Sol): 13,64''
Top (√úst): 0,74''

Thanks for your help.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.