microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

MS Graph Api Colorize Range in Excel - fill missing

Open
#2,764 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dependency:metadata type:feature
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

I am trying to colorize a row in an Excel Sheet.

My C# Code looks like that:

var formatRequestBody = new WorkbookRangeFormat
{
    Fill = new WorkbookRangeFill
    {
        Color = "#FFF00"
    }
};
await graphClient.Drives[driveId]
    .Items[FileId]
    .Workbook
    .Worksheets["table1"]
    .RangeWithAddress($"A{row.Index + 1}:H{row.Index + 1}")
    .Format
    .PatchAsync(formatRequestBody);

I get the error: The argument is invalid or missing or has an incorrect format.

Based on the endpoint, the code should be like ...Format.Fill.PatchAsync(body)

But the Fill request builder is missing in the SDK.

...
.Format
.Fill
.PatchAsync(formatRequestBody);

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.

Research direction

Start by tracing the RangeWithAddress(...).Format request-builder chain and compare it with the Excel workbook range-format endpoint described in the issue. Done means the SDK exposes the missing Fill path and the supplied request no longer produces the reported invalid-format error; the payload names no source file or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.