You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, sorry if I say something stupid. I'm basically self-taught when it comes to R (well, anything computer-related really) so I may be commiting some noob mistakes.
docx_update() wasn't working for me so I tried to find out why. I got into the docx_update_win() source and ran it line by line and I think I found what's happening to me.
When the function writes the temporary PowerShell script, it uses "/" in the filepath of $indocx. When I manually changed the "/" to "" it worked. I don't really understand why, as I read that Windows / PowerShell can use both types of slash... (Disclaimer: I know nothing about PowerShell).
I'm not really sure if this is really an issue of the function itself or if it's caused by some wrong config on my end. If needed, I will try to provide any additional information if asked.
Thank you for your time.
The text was updated successfully, but these errors were encountered:
I get no error in R itself, though when I run lines 19:20 of docx_update_win(), res$stderr does contain an error message from powershell. It's full of \n, \r and other escapes, so I've run the script from powershell itself and attached a screenshot for readability:
Sorry about the Spanish interface / error language. The first line says that it can not find the file.
I have the same problem, but it seems to happen only if there are spaces in the file name.
In PowerShell, $Word.Documents.Open("C:\Users\d_chaltiel\test test.docx") will work but $Word.Documents.Open("C:/Users/d_chaltiel/test test.docx") will not.
Unfortunately, doconv:::absolute_path() enforces the separator to be "/" so there seems to be no way to solve the problem outside the package.
The only workaround I found was to copy the input in a temporary file to get rid of spaces:
First of all, sorry if I say something stupid. I'm basically self-taught when it comes to R (well, anything computer-related really) so I may be commiting some noob mistakes.
docx_update() wasn't working for me so I tried to find out why. I got into the docx_update_win() source and ran it line by line and I think I found what's happening to me.
When the function writes the temporary PowerShell script, it uses "/" in the filepath of $indocx. When I manually changed the "/" to "" it worked. I don't really understand why, as I read that Windows / PowerShell can use both types of slash... (Disclaimer: I know nothing about PowerShell).
I'm not really sure if this is really an issue of the function itself or if it's caused by some wrong config on my end. If needed, I will try to provide any additional information if asked.
Thank you for your time.
The text was updated successfully, but these errors were encountered: