我正在使用Microsoft Graph SDK来更新工作表的范围格式,如下所示的代码段:
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);
但是有编译错误:
错误CS1061:“ IWorkbookWorksheetRangeRequestBuilder”不包含 “格式”的定义,并且没有可访问的扩展方法“格式” 接受类型的第一个参数 可以找到“ IWorkbookWorksheetRangeRequestBuilder”(您是 缺少using指令或程序集引用?)
Assembly Microsoft.Graph版本:1.16.0.0.0。