Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 695 Bytes

File metadata and controls

21 lines (14 loc) · 695 Bytes
description Automatically generated file. DO NOT MODIFY
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Drives\Item\Items\Item\Workbook\Names\AddFormulaLocal\AddFormulaLocalPostRequestBody;


$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);

$requestBody = new AddFormulaLocalPostRequestBody();
$requestBody->setName('test7');
$requestBody->setFormula('=SUM(Sheet2!$A$1+Sheet2!$A$2)');
$requestBody->setComment('Comment for the named item');

$result = $graphServiceClient->drives()->byDriveId('drive-id')->items()->byDriveItemId('driveItem-id')->workbook()->names()->addFormulaLocal()->post($requestBody)->wait();