Malta
Malta

Reputation: 1983

How to export from R to a calc ods file in multiple sheets

I try to export three dataframes to a single calc file (ods), but I don't see how to specify the sheet I'm writing into.

I tried the readODS package which has a write_ods function, but in the documentation I see not mention of a sheet specification.

Upvotes: 1

Views: 1381

Answers (2)

Patrick Petersen
Patrick Petersen

Reputation: 21

Don't know how it was 4 years ago but now there is an option to append to the ods file.

write_ods(df1, filename, sheet = "df1")

write_ods(df2, filename, sheet = "df2", append = TRUE)

Upvotes: 2

dasds
dasds

Reputation: 170

What exactly is your problem?

When you have a data.frame and export it using readODS::write_ods, then your output is a .ods file. Or do you want to export mutliple data.frames in one file using multiple sheets?

Upvotes: 1

Related Questions