OfficeExtension.ClientResult class
包含返回基元类型的方法的结果。 调用 后 context.sync() ,将从文档检索对象的 value 属性。
注解
使用方
- Excel.AllowEditRangeCollection: getCount
- Excel.Application: checkSpelling
- Excel.Binding: getText
- Excel.BindingCollection: getCount
- Excel.Chart: getDataRange、 getDataRangeOrNullObject、 getImage
- Excel.ChartCollection: getCount
- Excel.ChartFill: getSolidColor
- Excel.ChartLegendEntryCollection: getCount
- Excel.ChartPointsCollection: getCount
- Excel.ChartSeries: getDimensionDataSourceString、 getDimensionDataSourceType、 getDimensionValues
- Excel.ChartSeriesCollection: getCount
- Excel.ChartTrendlineCollection: getCount
- Excel.CommentCollection: getCount
- Excel.CommentReplyCollection: getCount
- Excel.ConditionalFormatCollection: getCount
- Excel.CustomPropertyCollection: getCount
- Excel.CustomXmlPart: getXml
- Excel.CustomXmlPartCollection: getCount
- Excel.CustomXmlPartScopedCollection: getCount
- Excel.DataPivotHierarchyCollection: getCount
- Excel.DocumentTaskChangeCollection: getCount
- Excel.DocumentTaskCollection: getCount
- Excel.FilterPivotHierarchyCollection: getCount
- Excel.GroupShapeCollection: getCount
- Excel.LinkedEntityDataDomainCollection: getCount
- Excel.LocalImage: getBase64EncodedImageData
- Excel.NamedItemCollection: getCount
- Excel.NamedSheetViewCollection: getCount
- Excel.NoteCollection: getCount
- Excel.PageBreakCollection: getCount
- Excel.PaneCollection: getCount
- Excel.PivotField: getFilters、 isFiltered
- Excel.PivotFieldCollection: getCount
- Excel.PivotHierarchyCollection: getCount
- Excel.PivotItemCollection: getCount
- Excel.PivotTable: getDataSourceString、 getDataSourceType
- Excel.PivotTableCollection: getCount
- Excel.PivotTableScopedCollection: getCount
- Excel.PivotTableStyleCollection: getCount
- Excel.QueryCollection: getCount
- Excel.Range: getCellProperties、 getColumnProperties、 getDisplayedCellProperties、 getImage、 getRowProperties、 replaceAll
- Excel.RangeAreasCollection: getCount
- Excel.RangeCollection: getCount
- Excel.RangeViewCollection: getCount
- Excel.RowColumnPivotHierarchyCollection: getCount
- Excel.SettingCollection: getCount
- Excel.Shape: getAsImage
- Excel.ShapeCollection: getCount
- Excel.Slicer: getSelectedItems
- Excel.SlicerCollection: getCount
- Excel.SlicerItemCollection: getCount
- Excel.SlicerStyleCollection: getCount
- Excel.StyleCollection: getCount
- Excel.TableCollection: getCount
- Excel.TableColumnCollection: getCount
- Excel.TableRowCollection: getCount
- Excel.TableScopedCollection: getCount
- Excel.TableStyleCollection: getCount
- Excel.TimelineStyleCollection: getCount
- Excel.Window: close、 pointsToScreenPixelsX、 pointsToScreenPixelsY
- Excel.WindowCollection: getCount
- Excel.Workbook: getIsActiveCollabSession、 getLinkedEntityCellValue、 inPreviewMode、 insertWorksheetsFromBase64
- Excel.Worksheet: evaluate、 replaceAll
- Excel.WorksheetCollection: addFromBase64, getCount
- Excel.WorksheetCustomPropertyCollection: getCount
- Excel.WorksheetProtection: checkPassword
- OneNote.Application: getDecimalSeparator、 getWindowSize、 isViewingDeletedNotes
- OneNote.Image: getBase64Image
- OneNote.Notebook: getRestApiId
- OneNote.Outline: isTitle
- OneNote.Page: analyzePage、 getRestApiId、 hasTitleContent
- OneNote.Paragraph: getParagraphInfo
- OneNote.RichText: getHtml
- OneNote.Section: getRestApiId
- OneNote.SectionGroup: getRestApiId
- PowerPoint.Adjustments: get
- PowerPoint.BindingCollection: getCount
- PowerPoint.CustomPropertyCollection: getCount
- PowerPoint.CustomXmlPart: getXml
- PowerPoint.CustomXmlPartCollection: getCount
- PowerPoint.CustomXmlPartScopedCollection: getCount
- PowerPoint.HyperlinkCollection: getCount
- PowerPoint.HyperlinkScopedCollection: getCount
- PowerPoint.Shape: getImageAsBase64
- PowerPoint.ShapeCollection: getCount
- PowerPoint.ShapeScopedCollection: getCount
- PowerPoint.Slide: exportAsBase64、 getImageAsBase64
- PowerPoint.SlideCollection: exportAsBase64Presentation, getCount
- PowerPoint.SlideLayoutCollection: getCount
- PowerPoint.SlideMasterCollection: getCount
- PowerPoint.SlideScopedCollection: exportAsBase64Presentation, getCount
- PowerPoint.TableCellCollection: getCount
- PowerPoint.TableColumnCollection: getCount
- PowerPoint.TableRowCollection: getCount
- PowerPoint.TagCollection: getCount
- PowerPoint.ThemeColorScheme: getThemeColor
- Visio.CommentCollection: getCount
- Visio.HyperlinkCollection: getCount
- Visio.PageCollection: getCount
- Visio.PageView: getPosition, isShapeInViewport
- Visio.Shape: getAbsoluteBounds、 getBounds
- Visio.ShapeCollection: getCount
- Visio.ShapeDataItemCollection: getCount
- Visio.ShapeView: addOverlay
- Word。应用程序:retrieveStylesFromBase64
- Word。书目:generateUniqueTag
- Word。正文:getHtml、getOoxml、getReviewedText
- Word。BookmarkCollection: exists
- Word。BuildingBlockCategoryCollection: getCount
- Word。BuildingBlockCollection: getCount
- Word。BuildingBlockEntryCollection: getCount
- Word。BuildingBlockTypeItemCollection: getCount
- Word。ContentControl:getHtml、getOoxml、getReviewedText
- Word。CustomPropertyCollection: getCount
- Word。CustomXmlNode:appendChildNode、appendChildSubtree、hasChildNodes、insertNodeBefore、insertSubtreeBefore、removeChild、replaceChildNode、replaceChildSubtree
- Word。CustomXmlNodeCollection: getCount
- Word。CustomXmlPart:addNode、getXml、loadXml、query
- Word。CustomXmlPartCollection: getCount
- Word。CustomXmlPartScopedCollection: getCount
- Word。CustomXmlPrefixMappingCollection:addNamespace、getCount、lookupNamespace、lookupPrefix
- Word。CustomXmlSchemaCollection:getCount、getNamespaceUri、validate
- Word。CustomXmlValidationErrorCollection:add、getCount
- Word。文档:canCheckin、computeStatistics、countNumberedItems、getCrossReferenceItems、importStylesFromJson、重做、returnToLastReadPosition、撤消
- Word。DocumentLibraryVersionCollection: isVersioningEnabled
- Word。EditorCollection: getCount
- Word。FontNameCollection:getCount、getItemAt
- Word。IndexCollection: getFormat
- Word。InlinePicture:getBase64ImageSrc
- Word。列表:getLevelPicture、getLevelString
- Word。ListFormat: canContinuePreviousList, countNumberedItems
- Word。段落:getHtml、getOoxml、getReviewedText、getText、insertAnnotations
- Word。范围:compareLocationWith、detectLanguage、getBookmarks、getHtml、getOoxml、getReviewedText
- Word。选择:计算、删除、展开、isEqual、isInRange、isInStory、move、moveDown、moveEnd、moveEndUntil、moveEndWhile、moveLeft、moveRight、moveStart、moveStartUntil、moveStartWhile、moveUntil、moveUp、moveWhile
- Word。SettingCollection: getCount
- Word。源:getFieldByName
- Word。StyleCollection: getCount
- Word。表:getCellPadding
- Word。TableCell:getCellPadding
- Word。TableOfAuthoritiesCategoryCollection: getCount
- Word。TableRow:getCellPadding
- Word。TemplateCollection: getCount
- Word。TextColumnCollection:getFlowDirection、getHasLineBetween、getIsEvenlySpaced
- Word。XmlMapping:setMapping、setMappingByNode
示例
await Excel.run(async (context) => {
// Get the count of worksheets in the Excel workbook.
const workbook = context.workbook;
let countResult: OfficeExtension.ClientResult<number> = workbook.worksheets.getCount();
// Sync to populate the countResult object.
await context.sync();
// Log the count using the value parameter.
console.log(countResult.value);
});
属性
| value | 调用后 |
属性详细信息
value
调用后 context.sync() 从文档检索的结果的值。
value: T;
属性值
T