Skip to content

MS Graph Api Colorize Range in Excel - fill missing #2764

@martinlammers

Description

@martinlammers

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependency:metadataAwaiting fix from core dependency project moduletype:featureNew experience request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions