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

Saving pptx files fails if officer is installed read-only #555

Open
natashanath opened this issue Mar 6, 2024 · 5 comments
Open

Saving pptx files fails if officer is installed read-only #555

natashanath opened this issue Mar 6, 2024 · 5 comments
Labels
need for further details Issue need more details to be understood

Comments

@natashanath
Copy link

natashanath commented Mar 6, 2024

If officer is installed read-only, saving pptx files fails. This is in reference to the issue stated here #549 which fixed for docx but fails for pptx.

library(officer)

my_pres <- read_pptx() 
my_pres <- add_slide(my_pres, layout = "Title and Content", master = "Office Theme")
print(my_pres, target = 'test.pptx')
> print(my_pres, target = 'test.pptx')
Error in write_xml.xml_document(private$doc, file = private$filename) : 
  Error closing file
In addition: Warning messages:
1: In write_xml.xml_document(private$doc, file = private$filename) :
  Permission denie [1501]
2: In write_xml.xml_document(private$doc, file = private$filename) :
  Permission denie [1501]
@davidgohel
Copy link
Owner

ha, ok

I will try to fix soon

@davidgohel davidgohel added the bug label Mar 6, 2024
@natashanath
Copy link
Author

@davidgohel following up on the issue. Is there anything required from our end that can help?

@nviets
Copy link

nviets commented Apr 30, 2024

Encountered the same issue. This one is important to me too. Thank you!

@davidgohel
Copy link
Owner

I am not able to reproduce.

It works with the github commit that was supposed to fix it:

nix-shell -p R -p '(rPackages.officer.overrideAttrs (_: {src = (fetchTarball "https://github.com/davidgohel/officer/archive/dbb27faa10e6a520092716748992d69271bf3c94.tar.gz");}))' --run 'Rscript -e "library(officer); d <- read_pptx(); d <- add_slide(d); print(d, target = \"~/test.pptx\")"'

It also works with the cran version:

nix-shell -p R -p rPackages.officer --run 'Rscript -e "library(officer); d <- read_pptx(); d <- add_slide(d); print(d, target = \"~/test.pptx\")"'

How can I reproduce your issue?

@davidgohel davidgohel added need for further details Issue need more details to be understood and removed bug labels May 5, 2024
@davidgohel
Copy link
Owner

@natashanath @nviets could you provide something that helps me to reproduce?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need for further details Issue need more details to be understood
Projects
None yet
Development

No branches or pull requests

3 participants