awalker89 / openxlsx

R package for .xlsx file reading and writing.
Other
365 stars 78 forks source link

Specifying a sheet in write.xlsx overwrites entire workbook #419

Open jzadra opened 6 years ago

jzadra commented 6 years ago

Expected Behavior

Use write.xlsx to create a new excel file. Use write.xlsx again with the same file name, specifying a different sheet name, and that sheet gets added (overwriting a sheet if it already exists).

Actual Behavior

Using write.xlsx the second time overwrites the entire workbook rather than adding/overwriting the specified sheet.

GegznaV commented 6 years ago

It would be an appreciated feature. I created my own function which adds sheets, but for beginners and lazy/busy people having this option without writing much code would be great.