S
S
SANYAAAASSSS2018-06-22 11:35:13
PHP
SANYAAAASSSS, 2018-06-22 11:35:13

Adding entries to google sheets using php?

Who is familiar with api google sheets, could you tell me what is wrong with this code? Throws an error on the last line of code. Please do not post links to documentation. Thank you!

$range = 'A1';
$spreadsheetId = '1vH3VkRoD3NIyuzxjl-eO8EnNLFbS32pvn2ztahSQ';
$values = [
    [
        'Какой-то текст'
    ],
];
$body = new Google_Service_Sheets_ValueRange([
  'values' => $values
]);
$body->majorDimension = 'ROWS'
$params = [
  'valueInputOption' => 'RAW'
];
$result = $service->spreadsheets_values->append($spreadsheetId, $range,$body,$params);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question