aspose.Word只返回第一个表和节

本文关键字:第一个 返回 Word aspose | 更新日期: 2023-09-27 18:13:15

我有office word 2013 .docx文件,其中有大量的节和表。我不知道为什么所有的集合像下面返回一个项目,而我有很多在我的。docx?

  Document document = new Document(filePath);
  int sectionsCount=document.Sections.Count;
  int firstSectionTablesCount=document.FirstSection.Body.Tables.Count;

谢谢

aspose.Word只返回第一个表和节

这是我的错,因为我没有申请许可证,我只得到了第一个表和section id文档。

申请许可证:

        Aspose.Words.License license=new License();
        license.SetLicense("Aspose.Words.lic");