0

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

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
Zack
  • 100
  • 7
  • 1
    If I'm not mistaken you can call `write_sheet()` with an empty data.frame and that will create a sheet with one empty row you can then subsequently call `sheet_append()` with your actual data. – br00t Jun 02 '23 at 18:58

1 Answers1

1

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")
stefan_aus_hannover
  • 1,777
  • 12
  • 13