Open mcgovernc7 opened 10 months ago
I am not sure why but when I submitted the issue, it split the R code I typed into two pieces. The first piece is in the response section, and the second piece is in the separate section of the submittal reserved for quick copy/pasting
I am using the openxlsx package in R studio to load an excel file into R and then overwrite a particular tab with new data. R then saves the updated file so it can be used later. This is supposed to automate a workflow.
I successfully ran the code in a dummy excel file ( a blank file with the correct tab names for R to delete, create new, and then overwrite).
When I went to use the code on the actual excel it was intended for, it ran successfully but when I went to open the file, it said it was corrupted. Excel tried to repair the file but it couldn't and now the file no longer opens.
I have tried tips I found online such as removing special characters from any of the tab names in the actual excel file, removing conditional formatting from all sheets, removing grouping from rows and columns.....but nothing has worked.
Can anyone help me with this issue?
The code is 99% complete but this last 1% is preventing me from automating a workflow.
I even tried relocating the file to a new file path that doesn't use special characters but that didn't work either.
Here is code:
FD_CVM<-FD127%>% filter(Group=="CVM") WB <- loadWorkbook("C:/Users/OneDrive - Company Name/Shared Documents - Company Name/Finance (Confidential)/FP&A/Decision Support/Shared Folder/Revenue/202311/ZBA model 2023.11 CVM.xlsx")