Skip to content

Delete media from workbook #548

@drk-1

Description

@drk-1

I would like to delete an image from a workbook.
wb@.xData$media[1]

image1.png
"C:/Users/DIEGO4~1/AppData/Local/Temp/RtmpKaTqyv/file50f81e22763a/xl/media/image1.png"

How can I go about it? If I just:
wb@.xData$media[1] <- NA

I get

Error in file.copy(x, file.path(xlmediaDir, names(media)[which(media == :
no files to copy to

when trying to save.

If
wb@.xData$media[1] <- ""
Then I can save but when opening the excel file it has to be repaired

Removed Part: /xl/drawings/vmlDrawing1.vml part. (Drawing shape)

Thanks!

sessionInfo()

  • Version of openxlsx: 4.2.5.2
  • Version of R: 4.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions