OfficeExtension.UpdateOptions interface
提供一个选项,用于在用于设置多个属性的对象尝试设置只读属性时禁止错误。
注解
使用方
- Excel.AllowEditRange: set
- Excel.Application: set
- Excel.CellValueConditionalFormat: set
- Excel.Chart:set
- Excel.ChartAreaFormat: set
- Excel.ChartAxes: set
- Excel.ChartAxis: 设置
- Excel.ChartAxisFormat: set
- Excel.ChartAxisTitle: set
- Excel.ChartAxisTitleFormat: set
- Excel.ChartBinOptions: set
- Excel.ChartBorder: set
- Excel.ChartBoxwhiskerOptions: set
- Excel.ChartDataLabel: set
- Excel.ChartDataLabelAnchor: set
- Excel.ChartDataLabelFormat: set
- Excel.ChartDataLabels: set
- Excel.ChartDataTable: set
- Excel.ChartDataTableFormat: set
- Excel.ChartErrorBars: set
- Excel.ChartErrorBarsFormat: set
- Excel.ChartFont: set
- Excel.ChartFormatString: set
- Excel.ChartGridlines: 设置
- Excel.ChartGridlinesFormat: set
- Excel.ChartLeaderLines: set
- Excel.ChartLeaderLinesFormat: set
- Excel.ChartLegend: set
- Excel.ChartLegendEntry: set
- Excel.ChartLegendFormat: set
- Excel.ChartLineFormat: set
- Excel.ChartMapOptions: set
- Excel.ChartPivotOptions: set
- Excel.ChartPlotArea: set
- Excel.ChartPlotAreaFormat: set
- Excel.ChartPoint: set
- Excel.ChartPointFormat: set
- Excel.ChartSeries: set
- Excel.ChartSeriesFormat: set
- Excel.ChartTitle: set
- Excel.ChartTitleFormat: set
- Excel.ChartTrendline: 设置
- Excel.ChartTrendlineFormat: set
- Excel.ChartTrendlineLabel: set
- Excel.ChartTrendlineLabelFormat: set
- Excel.ColorScaleConditionalFormat: set
- Excel.Comment: set
- Excel.CommentReply: set
- Excel.ConditionalDataBarNegativeFormat: set
- Excel.ConditionalDataBarPositiveFormat: set
- Excel.ConditionalFormat: set
- Excel.ConditionalFormatRule: set
- Excel.ConditionalRangeBorder: set
- Excel.ConditionalRangeFill: set
- Excel.ConditionalRangeFont: set
- Excel.ConditionalRangeFormat: set
- Excel.CustomConditionalFormat: set
- Excel.CustomProperty: set
- Excel.DataBarConditionalFormat: set
- Excel.DataPivotHierarchy: set
- Excel.DataValidation: set
- Excel.DocumentProperties: set
- Excel.FilterPivotHierarchy: set
- Excel.FormatProtection: set
- Excel.HeaderFooter: set
- Excel.HeaderFooterGroup: set
- Excel.HeaderFooterPicture: set
- Excel.IconSetConditionalFormat: set
- Excel.Image:set
- Excel.IterativeCalculation: set
- Excel.Line: set
- Excel.NamedItem: set
- Excel.Note:设置
- Excel.PageLayout: set
- Excel.PivotField: set
- Excel.PivotHierarchy: set
- Excel.PivotItem: set
- Excel.PivotLayout: set
- Excel.PivotTable: 设置
- Excel.PivotTableStyle: set
- Excel.PresetCriteriaConditionalFormat: set
- Excel.Range: set
- Excel.RangeAreas: set
- Excel.RangeBorder: set
- Excel.RangeFill: set
- Excel.RangeFont: set
- Excel.RangeFormat: set
- Excel.RangeView: set
- Excel.RowColumnPivotHierarchy: set
- Excel.Runtime: set
- Excel.Setting: set
- Excel.Shape: set
- Excel.ShapeFill: 设置
- Excel.ShapeFont: set
- Excel.ShapeLineFormat: set
- Excel.Slicer: 设置
- Excel.SlicerItem: set
- Excel.SlicerStyle: set
- Excel.Style: set
- Excel.Table: set
- Excel.TableColumn: set
- Excel.TableRow: set
- Excel.TableStyle: set
- Excel.TextConditionalFormat: set
- Excel.TextFrame: set
- Excel.TextRange: set
- Excel.TimelineStyle: set
- Excel.TopBottomConditionalFormat: set
- Excel.Window:set
- Excel.Workbook: set
- Excel.Worksheet: set
- Excel.WorksheetCustomProperty: set
- OneNote.Application: set
- OneNote.Image:设置
- OneNote.InkAnalysis: set
- OneNote.InkAnalysisLine: 设置
- OneNote.InkAnalysisParagraph: 设置
- OneNote.InkAnalysisWord: 设置
- OneNote.Page: 设置
- OneNote.PageContent: set
- OneNote.Paragraph: set
- OneNote.Table: set
- OneNote.TableCell: set
- Visio.Application: set
- Visio.Comment: set
- Visio.Document: set
- Visio.DocumentView: set
- Visio.Page: 设置
- Visio.PageView: set
- Visio.Shape: set
- Visio.ShapeView: 设置
- Word.应用程序: set
- Word.参考书目:套
- Word.正文:设置
- Word.书签:设置
- Word.边框:设置
- Word.BorderUniversal: set
- Word.休息:设置
- Word.BuildingBlock: set
- Word.BuildingBlockGalleryContentControl: set
- Word.画布:设置
- Word.CheckboxContentControl: set
- Word.CoauthoringLock: set
- Word.CoauthoringUpdate: set
- Word.ColorFormat: set
- Word.注释:设置
- Word.CommentContentRange: set
- Word.CommentReply: set
- Word.冲突:设置
- Word.ContentControl: set
- Word.ContentControlListItem: set
- Word.CustomProperty: set
- Word.CustomXmlNode: set
- Word.CustomXmlPart: set
- Word.CustomXmlValidationError: set
- Word.DatePickerContentControl: set
- Word.文档:设置
- Word.DocumentCreated: set
- Word.DocumentProperties: set
- Word.编辑器:set
- Word.字段:设置
- Word.FillFormat: set
- Word.字体: set
- Word.框架:设置
- Word.GlowFormat: 设置
- Word.GroupContentControl: set
- Word.HeadingStyle: set
- Word.超链接:设置
- Word.索引:设置
- Word.InlinePicture: 设置
- Word.LineFormat: set
- Word.行编号:设置
- Word.LinkFormat: set
- Word.ListFormat: set
- Word.ListItem: set
- Word.ListLevel: set
- Word.ListTemplate: set
- Word.NoteItem: set
- Word.OleFormat: set
- Word.页面设置: 设置
- Word.段落:设置
- Word.段落格式: set
- Word.PictureContentControl: set
- Word.范围:设置
- Word.ReflectionFormat: set
- Word.RepeatingSectionContentControl: set
- Word.RepeatingSectionItem: set
- Word.审阅者: 设置
- Word.修订:设置
- Word.RevisionsFilter: set
- Word.SearchOptions: set
- Word.部分:设置
- Word.设置:设置
- Word.底纹:设置
- Word.ShadingUniversal: set
- Word.ShadowFormat: set
- Word.形状:套装
- Word.ShapeFill:设置
- Word.ShapeGroup: set
- Word.ShapeTextWrap: set
- Word.样式:设置
- Word.表:设置
- Word.TableBorder: set
- Word.TableCell: set
- Word.TableColumn: set
- Word.TableOfAuthorities: set
- Word.TableOfContents: set
- Word.TableOfFigures: set
- Word.TableRow: set
- Word.TableStyle: set
- Word.模板:set
- Word.TextColumn: set
- Word.TextFrame: set
- Word.ThreeDimensionalFormat: set
- Word.视图:设置
- Word.窗口:设置
- Word.XmlMapping: set
示例
// Update a range in an Excel worksheet using the RangeUpdateData interface.
await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getItem("Sample");
const range = sheet.getRange("B2:E2");
// Configure the set operation to still run if a readonly property is included.
// All settable properties will be updated.
const options: OfficeExtension.UpdateOptions = {throwOnReadOnly: false};
// Set the range with some data from another source (`updateData` is set elsewhere).
range.set(updateData, options);
await context.sync();
});
属性
| throw |
如果传入的属性列表包含只读属性 (default = true) ,则引发错误。 |
属性详细信息
throwOnReadOnly
如果传入的属性列表包含只读属性 (default = true) ,则引发错误。
throwOnReadOnly?: boolean
属性值
boolean