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

Delete media from workbook #548

Open
drk-1 opened this issue Mar 24, 2023 · 1 comment
Open

Delete media from workbook #548

drk-1 opened this issue Mar 24, 2023 · 1 comment

Comments

@drk-1
Copy link

drk-1 commented Mar 24, 2023

I would like to delete an image from a workbook.
[email protected]$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:
[email protected]$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
[email protected]$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
@drk-1
Copy link
Author

drk-1 commented Mar 27, 2023

I made it work by running:

[email protected]$vml[1] <- ""

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

No branches or pull requests

1 participant