C#如何把输出word文档的文字居中?高手们。

bcw2001 2004-09-03 05:47:28
private void ImageExcel_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
Response.Clear();
Response.ContentType = "application/vnd.ms-word";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.Charset = " ";
StringWriter tw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(tw);
EnableViewState = false;
Response.AppendHeader("content-disposition","attachment; filename=JobReport.doc");
Report.RenderControl(hw);
Response.Write(tw.ToString());
Response.End();
}

以上是保存以word文档的,现在还想把输出word文档的文字居中,如何添加代码。
...全文
626 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
bcw2001 2004-09-03
  • 打赏
  • 举报
回复
有人帮我吗? 急急急!!!
bcw2001 2004-09-03
  • 打赏
  • 举报
回复
能具体一点吗? 在哪里加呢? 我是菜鸟,谢谢!!!
孟子E章 2004-09-03
  • 打赏
  • 举报
回复
Report里面时居中的就可以了

111,125

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧