rgooglesheets4

Write to Google sheet skipping 1st row


When using the package googlesheets4 is there any method for writing data to a sheet skipping the first row so that the data being written to a sheet starts at row 2? I am hoping to leverage something similar to when you read a sheet and utilize ex. skip = 2 to read data starting at the 3rd row

I have tried the following which does not work write_sheet(data = df, ss = "google_sheet_url", skip = 1, sheet = "test")

Desired output


Solution

  • skip=n is only for read_excel()

    in the googlesheets4 library to start at a specified range, you'd use range_write(). This is similar to the startRow=n in the xlsx library.

    range_write(ss = "google_sheet_url", data = df, range = "B1", sheet = "test")