将Word文档转换为Excel工作簿 [英] Converting a word document to excel workbook

查看:94
本文介绍了将Word文档转换为Excel工作簿的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



请任何人在以下情况下建议我.

我有一个带有邮件合并(合并字段)选项的模板文档(template.doc).我必须将此文档(template.doc)连同邮件合并选项一起转换为excel文件.这个怎么做?同样,转换后的模板(.xls)在字体大小,颜色,页眉,页脚,图像和合并字段方面应与文档模板(.doc)中的相同.如何做到这一点.请通过示例或一些URL向我提出建议,以便在其中找到一些好的解决方案.

注意:这里我只是在excel模板中单独创建合并"字段(占位符),无需合并数据.这是另一个阶段,因此无需在此处进行锻炼.

在此先感谢您.

Hi,

Please anyone suggest me with following scenario.

I have a template document (template.doc) with mail merge (Merge field) option. I have to convert this document (template.doc) to excel file along with the mail merge option. How to do this? Also the converted template (.xls) should look like the same as in document template (.doc) in font size, color, header, footer, image and merge field. How to achive this. Please suggest me with sample or some URL where i can find some good solution to do this.

Note: Here i am just creating the Merge field (place holder) alone in the excel template, no need for merging the data. It''s done is another phase, so no need to workout with that here.

Thanks in advance.

推荐答案

使用CSharp尚无直接方法.
您需要使用互操作性 [来自ASP.NET的Microsoft Word文档 [使用C#创建Excel文档 [
There isn''t any direct way to do it with CSharp.
You need to use Interoperability[^] for that.

I have found two useful articles on that.
Microsoft Word Documents from ASP.NET[^]
Using C# to Create an Excel Document[^]



HTH


这篇关于将Word文档转换为Excel工作簿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆