nacnudus / tidyxl

Read untidy Excel files in R https://nacnudus.github.io/tidyxl/
https://nacnudus.github.io/tidyxl/
Other
248 stars 21 forks source link

create xlsx from xlsx_cells #87

Closed AlbertoAlmuinha closed 2 years ago

AlbertoAlmuinha commented 2 years ago

Hi,

I would like to know if it is possible that once an xlsx is loaded through the xlsx_cells function and, for example, some of the loaded values ​​are modified:

df->xlsx_cells(“example.xlsx”)

df-> df %>% filter(row == 10 & col == 13) %>% mutate(numeric = 0.8)

is it possible to regenerate the excel from the new modified df? i'm thinking something like:

write_xlsx(df, “example_new.xlsx”)

is it possible to do something like this?

Thanks

nacnudus commented 2 years ago

That isn't possible with tidyxl, sorry. I think something like that is possible with openxlsx, but in general it is very hard to maintain software that can do a round trip with Excel. Libreoffice and Google Sheets do it pretty well, but not perfectly.