Hi, i found about a package who could export my data.frame to excel, but i encounter some difficulties.
(I'm new on this plateform and i'm sorry if something in my request is wrong, do not hesitate to get me noticed about it if it is the case!)
I am trying to export a dataframe called "div1" to an excel doc called "TEST.xlsx" using the function write_xlsx from the package writexl, but i got an error message and don't know how to resolve it:
There is my running of the console:
> write_xlsx(div1,"C:\\Users\\Utilisateur\\Desktop\\TEST.xlsx")
[ERROR] workbook_close(): Error creating 'C:\Users\Utilisateur\Desktop\TEST.xlsx'. System error = Permission denied
Erreur : Error in libxlsxwriter: 'Error creating output xlsx file. Usually a permissions error.'
PS: i do not know why but the topic creation transformed my double "" into a single one
I'm using the Rstudio Version 1.3.1093 in admin mode and using doc.xlsx with OpenDocument.
The error says that the function has encountered a permission problem. Are you logged into Windows with the user name Utilisateur? Have you tried saving the data frame without specifying a path so that it safes to a temp folder? That would prove that you can save the file somewhere.
Yes i am logged with Utilisateur.
I do not understand what you mean by "specific path", neither about saving to a temp folder.. (you mean on the cloud or something like that?)
Sorry for my poor knowledge, make the thing more complicated for you...
I get to found my .xlsx doc into that file "RtmpEPUWRC".
Thats already really nice, but is there a way to transfer my dataframe into an already created .xlsx doc, as i excepted earlier with my doc "TEST.xlsx" ?
I did not understand that the file TEST.xlsx already exists on your desktop. I don't think you can write into that file using the writexl package. I think you can do tis with the openxlsx package, though I have never tried it. Do you want to write your data frame into a new sheet in the existing file, or do you want to append the data to data that are already there, or do you want to overwrite the data on an existing sheet?
I will have to step away from this thread for several hours but someone else may well be able to help you once you explain how you want to modify the existing file.
I wanted to created new sheet into that file already created, yes. But that doesnt really matter anymore, the temp file will do just fine I guess..
But if someone has a simpler way to do it (and directly to a precise file), you can do it of course.
Thanks a lot for your help, I really appreciate it !