google sheets get sheet by name

70

google sheets get sheet by name -

var sheet = SpreadsheetApp.getActive().getSheetByName('YourSheetNameHere')

Google Sheets get sheet name -

<?php

$sheets = array();

// ... load library and set up client ...
$service = new Google_Service_Sheets($client);

$response = $service->spreadsheets->get($spreadsheetId);
foreach($response->getSheets() as $s) {
    $sheets[] = $s['properties']['title'];
}

return $sheets;

?>

Comments

Submit
0 Comments