获取全表

GetAllTables() → {数组 }

从当前文档内容返回所有表数组

参数:

这种方法没有任何参数

返回时间 :

类型
数组

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvarolements=ODocument.GetEplement0varoFinll =api.CreateSolidFillVarostroke = Api.Createstroke 0,Api.CreatenoFinllVar Oshape = Api.CreateShapeoParagraph.AddDrawing(oShape)!varoccontent=oshape.getdoccontentvar表Style=ODocument.CreateStyleoTableStyle.SetBasedOn(oDocument.GetStyle("Bordered"))!varo表=api.Criate表(3,3)oTable.SetWidth("percent", 100)!oTable.SetStyle(oTableStyle)!oDocContent.Push(oTable)!var表=occontent.GetAllTablesodeptes = Api.CreatelementsodText ("这只是第一个单元格样本文本.")varoCellsss.GetCells0a表[0].builder.SaveFile("docx", "GetAllTables.docx")!builder.CloseFile();

结果文档