I want to delete row in googlesheet using googlesheet api v4
<p>I want to delete a row using rowno in googlesheet using googlesheetv4 api.
Can anybody provide me a sample code for this?
I have created a method for delete row:</p>

<pre><code>public void deleteRow() {

    BatchUpdateSpreadsheetRequest content = new BatchUpdateSpreadsheetRequest();
    Request request = new Request();
    request.setDeleteDimension(new DeleteDimensionRequest().setRange(new DimensionRange().setDimension("D30:D31")));

    List&lt;Request&gt; requests = new ArrayList&lt;Request&gt;();
    requests.add(request);
    content.setRequests(requests);
    System.out.println(content.getRequests());

    try {
        service.spreadsheets().batchUpdate(IConstant.SPREADSHEET_ID, content);

    } catch (IOException e) {
        e.printStackTrace();
    }
}
</code></pre>