如何在Asp.Net中将HTML导出到Word
问题描述:
嗨朋友们,
我正在开发visual studio 2010中的asp.net应用程序。我正在使用 response.AddHeader将html表导出为单词( ------)。我正在获取word文档。在这里,我想使用c#代码设置word文档边距,页面高度和宽度。请帮忙怎么做。
问候,
Kishore Kumar Y
Hi friends,
I'm developing an asp.net application in visual studio 2010. i am exporting html table to word using response.AddHeader("------"). i'm getting word document. Here i want to set word document margins, page height and width by using c# code. please help how to do it.
Regards,
Kishore Kumar Y
答
你可以使用word interop。
链接MSDN: http://msdn.microsoft.com/fr-fr/library/Microsoft.Office.Interop.Word%28v=office.11%29。 aspx [ ^ ]
你可以轻松找到关于它的教程
You can use word interop.
Link MSDN :http://msdn.microsoft.com/fr-fr/library/Microsoft.Office.Interop.Word%28v=office.11%29.aspx[^]
You can easely find tutorials about it
这些可以帮助您:
更改文字处理文档的打印方向 [ ^ ]
从C#设置Word 2010文档边距 [ ^ ]
更改Word文档的边距 [ ^ ]
These could help you:
Change the print orientation of a word processing document[^]
Set Word 2010 document margins from C#[^]
Changing the margins of a Word Document[^]