现在有一个word文档.doc,怎样用asp.net(c#)将其转换为.htm或者.html网页文档格式(包括图片等)?请大家帮忙!谢谢啊!!
解决方案 »
- 请教浏览器问题
- 关于vs2005和vs2008的一个疑问!
- web c#中 treeview 节点随意拖动??????
- C#2005做的winform项目,textBox控件 安装在winXP可输入20汉字,在win98系统只可输入10个汉字什么原因?
- 问一个比较菜的问题,用水晶报表画表时,直接连数据表中的字段。为什么不能显示出数据
- 如何按要求读取文本文件的内容?跪地求解!
- 一个简单问题,不知该怎样写
- c#主窗体(父窗体)没法隐藏
- 在Winform中,我选中窗体上的textBox或datagrid改变其字体的大小应该如何做?
- 帮忙看看一下一小段代码.解释一下都是什么意思
- 怎样在客户端自动安装CAB文件啊?
- winform drawString 为什么我画上不显示.
{
Word.Document wDoc=null;
Word.Application wApp=null;
sysFun.CreateWordDocument("E:\\监测报告(new).dot",ref wDoc,ref wApp); //对标签"C"进行填充
object bkmC="C";
if(wApp.ActiveDocument.Books.Exists("C") == true)
{
wApp.ActiveDocument.Books.get_Item
(ref bkmC).Select();
}
wApp.Selection.TypeText(this.txt1.Text);
object bkmG = "TWaterTable3";
object unit;
object count; //移动数
object extend;
extend = Word.WdMovementType.wdExtend;
unit = Word.WdUnits.wdCell;
//把DataGrid中数据填充到标签TWaterTable3上
if(wApp.ActiveDocument.Books.Exists("TWaterTable3") == true)
{
wApp.ActiveDocument.Books.get_Item
(ref bkmG).Select(); for(int i=0;i {
if(i==0)
{
count=1;
}
else
{
count=0;
}
//需填充5列数据
wApp.Selection.Move(ref unit,ref count);
wApp.Selection.TypeText(gridEX1.GetRow(i).Cells[0].Text);
count=1; wApp.Selection.Move(ref unit,ref count);
wApp.Selection.TypeText(gridEX1.GetRow(i).Cells[1].Text); wApp.Selection.Move(ref unit,ref count);
wApp.Selection.TypeText(gridEX1.GetRow(i).Cells[2].Text); wApp.Selection.Move(ref unit,ref count);
wApp.Selection.TypeText(gridEX1.GetRow(i).Cells[3].Text); wApp.Selection.Move(ref unit,ref count);
wApp.Selection.TypeText(gridEX1.GetRow(i).Cells[4].Text);
//换行
wApp.Selection.MoveRight(ref unit,ref count,ref extend);
}
}
}
或者用ADO保存word为mht网页格式。代码我忘了,要翻一下才知道了