microsoftgraph / microsoftgraph/msgraph-sdk-php

Excel UsedRange (WORKS on Graph Explorer, and code is given by the Explorer)

Open
#1,562 0 comments 0 reactions 1 assignee View on GitHub

@rkodev is already working on this.

Since Aug 8, 2024.

bug: documentation type:bug
Dominant language
PHP
Stars
669
Forks
150
Avg merge
15h 21m
Merged PRs (30d)
3

Description

Is your feature request related to a problem? Please describe the problem.

When trying to Get values from a UsedRange on an shared Excel.

Graph Explorer provides the following example:

<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Drives\Item\Items\Item\Workbook\Worksheets\Item\UsedRange\UsedRangeRequestBuilderGetRequestConfiguration;


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

$requestConfiguration = new UsedRangeRequestBuilderGetRequestConfiguration();
$queryParameters = UsedRangeRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->select = ["text"];
$requestConfiguration->queryParameters = $queryParameters;


$result = $graphServiceClient->drives()->byDriveId('drive-id')->items()->byDriveItemId('driveItem-id')->workbook()->worksheets()->byWorkbookWorksheetId('workbookWorksheet-id')->usedRange()->get($requestConfiguration)->wait();

This works on the graph explorer and you get the calculated field values, instead of the data without formulas applied.

However $queryParameters = UsedRangeRequestBuilderGetRequestConfiguration::createQueryParameters(); method does not exist.

Describe the solution you'd like.

Method added to the existing Code

Additional context?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.