If it were me. I'd used OleDB, and load "Sheet3" into N number of datasets,
using the LoadDataSet or ExecuteDataSet methods.
THen I'd create a master dataset, and use the DataSet.Merge method.
Take a look here for another optional idea.
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!148.entry
I would strongly AVOID the Excel object model for this. If you're using an
excel interop, then you're using the Excel Object Model.
You also need to report the version of DotNet you're using.
Here is a potential helper article for 3.5.
http://bloggingabout.net/blogs/denni...sing-linq.aspx
"stephen" <st********@hotmail.comwrote in message
news:eT**************@TK2MSFTNGP02.phx.gbl...
>
Hi,
I have 5 excel files and they have multiple sheets. I have to read (say
sheet 3) of each of the 5 excel files and consolidate them into one.
what's the best way to achieve this. if someone can point me to an article
or sample that will be real helpful.
I am able to read a excel file and then do whatever I want but how to have
5 excel files open and then read and then consolidate. I am a bit confused
here.
Thanks for all your help,
Stephen