工作表资源类型Worksheet resource type

Excel 工作表是由单元格组成的网格。An Excel worksheet is a grid of cells. 它可以包含数据、表、图表等。It can contain data, tables, charts, etc.

方法Methods

方法Method 返回类型Return Type 说明Description
获取工作表Get Worksheet WorkbookWorksheetWorkbookWorksheet 读取 worksheet 对象的属性和关系。Read properties and relationships of worksheet object.
创建图表Create Chart WorkbookChartWorkbookChart 通过发布到图表集合创建新的图表。Create a new Chart by posting to the charts collection.
列出名称List names WorkbookNamedItem 集合WorkbookNamedItem collection 获取与工作表关联的命名项的集合。Get named item collection associated with the worksheet.
列出图表List charts WorkbookChart 集合WorkbookChart collection 获取 Chart 对象集合。Get a Chart object collection.
创建表Create Table WorkbookTableWorkbookTable 通过发布到表集合创建新表。Create a new Table by posting to the tables collection.
列出表List tables WorkbookTable 集合WorkbookTable collection 获取 Table 对象集合。Get a Table object collection.
更新Update WorkbookWorksheetWorkbookWorksheet 更新 Worksheet 对象。Update Worksheet object.
单元格Cell 区域Range 根据行和列编号获取包含单个单元格的 range 对象。单元格可以位于父区域外部,只要其保持在工作表网格内即可。Gets the range object containing the single cell based on row and column numbers. The cell can be outside the bounds of its parent range, so long as it's stays within the worksheet grid.
区域Range 区域Range 获取地址或名称指定的 range 对象。Gets the range object specified by the address or name.
UsedrangeUsedrange 区域Range 使用的区域是包含分配了值或格式化的任何单元格的最小区域。如果工作表为空,此函数将返回左上角的单元格。The used range is the smallest range that encompasses any cells that have a value or formatting assigned to them. If the worksheet is blank, this function will return the top left cell.
删除Delete None 从工作簿中删除工作表。Deletes the worksheet from the workbook.
ListList WorkbookWorksheet 集合WorkbookWorksheet collection 获取 worksheet 对象集合。Get worksheet object collection.
AddAdd WorkbookWorksheetWorkbookWorksheet 向工作簿添加新工作表。将工作表添加到现有工作表的末尾。Adds a new worksheet to the workbook. The worksheet will be added at the end of existing worksheets.
List pivotTablesList pivotTables workbookPivotTable 集合workbookPivotTable collection 获取一组 workbookPivotTable 对象。Get a workbookPivotTable object collection.

属性Properties

属性Property 类型Type 说明Description
idid stringstring 返回用于唯一标识指定工作簿中工作表的值。即使工作表被重命名或移动,标识符的值仍然相同。只读。Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. Read-only.
namename stringstring 工作表的显示名称。The display name of the worksheet.
positionposition intint 工作表在工作簿中的位置,从零开始。The zero-based position of the worksheet within the workbook.
visibilityvisibility stringstring 工作表的可见性。The Visibility of the worksheet. 可能的值包括 VisibleHiddenVeryHiddenThe possible values are: Visible, Hidden, VeryHidden.

关系Relationships

关系Relationship 类型Type 说明Description
图表charts WorkbookChart 集合WorkbookChart collection 返回属于工作表的图表的集合。Returns collection of charts that are part of the worksheet. 只读。Read-only.
namesnames WorkbookNamedItem 集合WorkbookNamedItem collection 返回与该工作表关联的名称集合。Returns collection of names that are associated with the worksheet. 只读。Read-only.
pivotTablesPivotTables workbookPivotTable 集合workbookPivotTable collection 一组属于工作表的数据透视表对象。Collection of PivotTables that are part of the worksheet.
保护protection WorkbookWorksheetProtectionWorkbookWorksheetProtection 返回表工作表的工作表保护对象。只读。Returns sheet protection object for a worksheet. Read-only.
表格tables WorkbookTable 集合WorkbookTable collection 属于工作表的表的集合。Collection of tables that are part of the worksheet. 只读。Read-only.

JSON 表示形式JSON representation

下面是资源的 JSON 表示形式。Here is a JSON representation of the resource.

{
  "id": "string",
  "name": "string",
  "position": 1024,
  "visibility": "string"
}