资源简介
本资源采用aspose.words 组件实现插入文件,页面设置,替换
表格操作,分页等方法。本资源采用aspose.words 组件实现插入文件,页面设置,替换
表格操作,分页等方法。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Diagnostics;
using Aspose.Words;
using Aspose.Words.Tables;
using System.Collections;
namespace TKS.framework.Common
{
public class AsposeWordApp
{
///
/// word版本
///
private int _docversion;
public int Docversion
{
get { return _docversion; }
set { _docversion = value; }
}
private DocumentBuilder oWordApplic; // a reference to Word application
private Aspose.Words.Document oDoc; // a reference to the document
public void OpenWithTemplate(string strFileName)
{
if (!string.IsNullOrEmpty(strFileName))
{
oDoc = new Aspose.Words.Document(strFileName);
}
}
public void Open()
{
oDoc = new Aspose.Words.Document();
}
public void Builder()
{
oWordApplic = new DocumentBuilder(oDoc);
}
///
/// 保存文件
///
///
public void SaveAs(string strFileName)
{
if (this.Docversion == 2007)
{
oDoc.Save(strFileNameSaveFormat.Docx);
}else
{
oDoc.Save(strFileNameSaveFormat.Doc);
}
}
///
/// 添加内容
///
///
public void InsertText(string strText double conSize bool conBold string conAlign)
{
oWordApplic.Bold = conBold;
oWordApplic.Font.Size = conSize;
switch (conAlign)
{
case “left“:
oWordApplic.ParagraphFormat.Alignment = ParagraphAlignment.Left;
break;
case “center“:
oWordApplic.ParagraphFormat.Alignment = ParagraphAlignment.Center;
break;
case “right“:
oWordApplic.ParagraphFormat.Alignment = ParagraphAlignment.Right;
break;
default:
oWordApplic.ParagraphFormat.Alignment = ParagraphAlignment.Left;
break;
}
oWordApplic.Writeln(strText);
}
///
/// 添加内容
///
///
public void WriteText(string strText double conSize bool conBold string conAlign)
{
oWordApplic.Bold = conBold;
oWordApplic.Font.Size = conSize;
switch (conAlign)
{
case “left“:
oWordApplic.Paragrap
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-05-29 16:19 aspose.words\
文件 19983 2013-05-29 15:37 aspose.words\AsposeWordApp.cs
文件 51096 2013-05-24 10:13 aspose.words\CCWordApp.cs
文件 17565 2013-05-29 14:18 aspose.words\DownWordLibary.cs
目录 0 2013-05-29 16:18 aspose.words\lib\
文件 7233536 2012-05-29 18:56 aspose.words\lib\Aspose.Words.dll
相关资源
- Aspose.Words V13.3 破解版
- Aspose.Slidest替换Powerpoint里面的Chart的数
- aspose.cad
- Aspose.cells使用文档及类库合辑
- Aspose.Words根据word模板写入数据和图表
- aspose.slides-15.9.0最新完美破解版无水印
- Aspose Excel Word PPT PDF .dll
- Aspose.Slides.NET.18.10.0破解版
- aspose实现在线预览pptdocexcelpdf
- Aspose.Pdf 17.7最新破解版,绝对可用
- aspose-words 19.5jdk
- 使用Aspose组件文档转图片
- aspose.net(破解版).rar
- Aspose.Words.dll文件.zip
- Aspose.Words帮助API
- Aspose.Words.dll155229
- Aspose类,PDF转word
- Aspose.Words.dll
- Aspose.word for .NET 18.7破解版(附Core)亲
- Aspose.Words.dll 和帮助手册
- Aspose.Slides v15.3.1破解版
- Aspose16.01及其授权
- Aspose.Slides破解版 版本16.11.0.0 附带破
- Aspose.Words
- aspose.pdf.dll
- Aspose.total 破解办法仅限测试、研究
- Aspose.Slides for net 4.0 16.12破解
- Aspose.Words 16.7 for .NET 破解版已加强名
- Aspose.Words + Aspose.Cells + Aspose.Slides 19
- aspose 文件转化 excel-word-ppt 含 lisence
评论
共有 条评论