[英]How to create an embedded Excel worksheet in a Word document and populate it with data?
Say I have a word document and a Excel worksheet, how can I create an embedded Excel worksheet within the Word document, which you can manipulate just like a normal Excel sheet. 假设我有一个Word文档和一个Excel工作表,如何在Word文档中创建一个嵌入式Excel工作表,您可以像处理普通Excel工作表一样对其进行操作。
Then, after creating it, how do I populate it with the data from the original Excel worksheet? 然后,在创建它之后,如何用原始Excel工作表中的数据填充它?
Edit: I should have clarified that this should be done programatically in C#. 编辑:我应该澄清这应该在C#中以编程方式完成。
Go to intsert->Object->create new, select Microsoft excel and click ok. 转到“插入”->“对象”->“新建”,选择Microsoft excel,然后单击“确定”。
It will insert a blank excel in your word doc. 它将在您的Word文档中插入一个空白的Excel。
To edit the excel inserted in word doc, right click, worksheet object-->edit 要编辑在Word文档中插入的Excel,请右键单击工作表对象->编辑
Then simply copy the values from any other excel and paste it here. 然后,只需复制任何其他excel的值并将其粘贴到此处即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.