如何附加Excel文件 [英] How can append excel files

查看:94
本文介绍了如何附加Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我可以寻求您的帮助吗?如何将excel文件附加到另一个excel文件中.
例如,我有一个另存为Base.xls的excel文件,我需要在Base.xls文件内复制一些数据,然后将其粘贴到另一个另存为Repository.xls的Excel文件中.
请我需要您的全部帮助

感谢

Hi all,
Can I ask for your help?, how can I append excel file to another excel file.
For example, I have an excel file save as Base.xls and I need to copy some data inside the Base.xls file and paste it on another Excel file save as Repository.xls.

please i need all your help

thanks

推荐答案

基本上有两种方法可以做到这一点.一种是通过使用Excel对象模型,另一种是通过使用Microsoft Jet Engine.下面的文章应为您提供有关如何执行操作的足够信息.

C#Excel教程
[^ ]
There are basically 2 ways to do this. One is by using the Excel Object Model and the other one is by using the Microsoft Jet Engine. The article below should give you enough information on how to do it.

C# Excel Tutorial
[^]


我建​​议您为此使用VBA(有些人称其为编写宏). Excel中的VBA可让您非常轻松地操作Excel数据.我已经做了很多次这样的自动化.阅读VBA并试一试.如果您有任何问题,请把它发回这里,我一定会帮助您的:)

希望对您有所帮助,请注意
I suggest you use VBA (some call it writing macros) for this. VBA in Excel allows you to manipulate Excel Data very easily. I''ve done these kind of automation a lot of times. Read up on VBA and give it a shot. Post it back here if you got any problem, I''ll definitely help you out :)

Hope this helps, Regards


您可以将第一张工作表中的所有行和第二张工作表中的所有行都选择为两个Datatable,然后使用DataSet.Merge(
You could select all the rows from the first sheet and all the rows from the second sheet into two Datatables and then use DataSet.Merge (http://msdn.microsoft.com/en-us/library/803bh6bc.aspx[^]).


这篇关于如何附加Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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