openxlsx icon indicating copy to clipboard operation
openxlsx copied to clipboard

Is there a way to delete ROWS in a worksheet

Open andyosborn opened this issue 8 years ago • 7 comments

I can use deleteData to clear a section of cells but what I want to do is the equivalent (in Excel) of selecting a group of rows in the middle of a sheet, right click and selecting "Delete". I have tried various workarounds, like using deleteData, saving the workbook and reopening with readWorkbook(outputfile, sheet = "Sightings", skipEmptyRows = TRUE ...) but this results in the data and formatting getting mixed up. Apologies if I am being particularly dumb here, surely there is a way to do this?

andyosborn avatar Jul 22 '16 17:07 andyosborn

If this feature gets implemented, it would also be nice to be able to delete whole COLUMNS.

Paykoman avatar Sep 15 '16 05:09 Paykoman

I agree this would be a useful feature. What I would ideally like to see is something similar to deleteData, but instead of gridExpand an option to specify the type of delete with the 4 options that are in Excel (Shift cells left, Shift cells up, Entire row, Entire column).

kerry-ja avatar Oct 31 '18 20:10 kerry-ja

+1

jzadra avatar May 25 '22 19:05 jzadra

+1

DavZim avatar Mar 20 '23 19:03 DavZim

+1

benyamindsmith avatar Aug 08 '23 23:08 benyamindsmith

+1

lewkrr avatar Mar 18 '24 15:03 lewkrr