2 years ago

#75714

test-img

lerm16

How to reflect changes made in xlsx files?

I'm trying to wrangle data from a shared excel file in one drive. I have synced one drive to my macbook so I'm easily able to access it in r with a path. I have the following code:

my_data <- "Users/B.../Folder/my_file.xlsx"
excel_sheets(path = my_data)

I'm not sure if more of my code would be necessary for this question, but I just go on to organize the data:

str(list_all)

sheets <- excel_sheets(path = my_data)

list_all_2 <- lapply(sheets, function(x) read_excel(path = my_data, sheet = x))

str(list_all_2)

my_data_2 <- rbind.fill(list_all_2)
str(my_data_2)

My issue comes at this point. As I said, I'm using data from a shared excel file and I want to be able to run this code a few times for analyses that will reflect the newly changed/added data. When I go into the excel file and change something, it isn't reflected in the df in my working directory so I'm not sure it's working/ways in which to fix this.

r

excel

data-wrangling

wrangle

0 Answers

Your Answer

Accepted video resources