question about opening an excel object

i need to make a simple program that loops though a list of excel files and copy/past 1 row to a master excel sheet.

i see that i have several options to create excel objects:

* using a connectionstring OLEDB
* use Excel Reference (Microsoft.Office.Interop.Excel)
* CreateObject("EXCEL.APPLICATION")

What's the best way to do this? i want the option that is less dependent on the excel version of the end user (so it should work on both Excel 2007 and Excel 2010). And i don't want to install extra drivers like a OLEDB connector.

I have Excel 2010 installed on my laptop, endusers have Excel 2003 or Excel 2007
Ollie90Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

raysonleeCommented:
I'd suggest using MS Office Interop. The latest version is backward compatible. Copy / paste of a row for Excel 2003 - 2010 should not have any problem.
CodeCruiserCommented:
If you want it to be version agnostic, use the dynamic approach (CreateObject).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ollie90Author Commented:
ok, two different answers :)

my first thought was also interop because of the backward compatible ..

@CodeCruiser, why CreateObject instead of interop?
CodeCruiserCommented:
Microsoft does not guarantee that the Office PIAs will be backwardly compatible


http://support.microsoft.com/default.aspx?scid=kb;en-us;840585
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.