I am using the Microsoft Graph SDK to update range format of the worksheet as code snippets shown below:
GraphServiceClient graphClient = new GraphServiceClient(authProvider);
var workbookRangeFormat = new WorkbookRangeFormat
{
HorizontalAlignment = "Center",
VerticalAlignment = "Top",
RowHeight = 49
};
await graphClient.Me.Drive.Items[fileId].Workbook
.Worksheets[sheetName].Range(range).Format
.Request()
.UpdateAsync(workbookRangeFormat);
But there is compiling error:
error CS1061: 'IWorkbookWorksheetRangeRequestBuilder' does not contain a definition for 'Format' and no accessible extension method 'Format' accepting a first argument of type 'IWorkbookWorksheetRangeRequestBuilder' could be found (are you missing a using directive or an assembly reference?)
Reference: Update range format
The Assembly Microsoft.Graph Version: 1.16.0.0.