日常笔记

  Aspose.Words.Document doc = new Aspose.Words.Document("E:\\112.doc");
            Aspose.Words.Tables.Table  TableMain = doc.GetChildNodes(NodeType.Table, true)[0] as Aspose.Words.Tables.Table;//以表格方式读取数据
            var table0 = doc.GetChildNodes(NodeType.Table, true)[0] as Aspose.Words.Tables.Table;


  //Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook("E:\\122.xls");
            //Aspose.Cells.Cells cells = workbook.Worksheets[0].Cells;

            //DataTable dataTable1 = cells.ExportDataTable(1, 0, cells.MaxDataRow, cells.MaxColumn);//noneTitle
            //DataTable dataTable2 = cells.ExportDataTable(0, 0, cells.MaxDataRow + 1, cells.MaxColumn, true);//showTitle
            //gridControl1.DataSource = dataTable1;
            //gdZJ.DataSource = dataTable2;


            LicenseHelper.ModifyInMemory.ActivateMemoryPatching();
            Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document("E:\\22.pdf");


            TableAbsorber absorber = new TableAbsorber();

            //使用吸收器访问首页
            absorber.Visit(pdfDocument.Pages[1]);
            AbsorbedTable table = absorber.TableList[0];

            // 可以访问页面上的第一个表,它们的第一个单元格和文本片段
            TextFragment fragment = absorber.TableList[0].RowList[4].CellList[5].TextFragments[1];
            TextFragment fragment2 = absorber.TableList[0].RowList[5].CellList[5].TextFragments[1];

            ExcelSaveOptions options = new ExcelSaveOptions();
            // Save output file
            

             pdfDocument.Save("122.xls", Aspose.Pdf.SaveFormat.Excel);
            DocSaveOptions opt = new DocSaveOptions();
            //pdfDocument.Save("112.docx", opt);
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值