i'm new to Google Sheets API, currently i am develop a system to send data to google sheets. And while im trying to send the data, it shows error like: Invalid values [0][0]
Below is my code line.
`
$client = getClientAuth();
$spreadsheet_ID = $this->spreadsheet->spreadsheetId;
$range = "Sheet1";
$values = $this->sheetData;
$this->service = new Sheets($client);
$body = new ValueRange([
'majorDimension' => 'ROWS',
'values' => [array_map(function($nv) {
return (is_null($nv)) ? "" : $nv;
},$values)]
]);
$params = ['valueInputOption' => 'RAW'];
$insert = ['insertDataOption' => 'INSERT_ROWS'];
//executing the request
$data = $this->service->spreadsheets_values->append($spreadsheet_ID, $range,
$body, $params, $insert);
return $data;
`
