473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Reading multiple excel files and consolidating into one!!!


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
Oct 22 '08 #1
3 5893

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

Oct 22 '08 #2
Hi Stephen,

I don't have an answer to your question but I am now researching merely
reading excel in asp.net so if you could point me in the right direction,
that would be appreciated.

Ellie

"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
Oct 23 '08 #3
I just read the next post and there is a link so I think I have my answer!

"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
Oct 23 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jen | last post by:
Trying to take one table in access and split it into multiple excel files(using an excel template); and then email based on email addresses in Table2; Of course, I would like to do all of this...
4
by: Phoebe. | last post by:
Hi, Good Day! Reading 1 excel file into a dataset is fine. How can I read multiple excel with the same data structure into 1 dataset? How can I append those data? Can someone help? Thanks in...
0
by: amy | last post by:
Hi, all: > i am a new end user of access, now I have many excel files need to > import to One table in access (combine all excel files into one table > in excel). In excel files, some columns will...
1
by: mednyk | last post by:
It's very simple import, without any data modifications; from several excel files to one table. I tried the wisard and it gives me selection for only one file. I am not used to create DTS...
3
by: theodorej | last post by:
......how do I select multiple Excel files to import into Access? Any insights would be deeply appreciated.
28
by: kkadakia | last post by:
I get a daily excel file for a entire month which I want to transfer into Access at the end of the month. So, there are around 20-25 excel files I get by the end of the month, and I would like to...
2
by: ciaran.hudson | last post by:
Hi I have multiple excel files of the same format in a directory. They are called book1.xls, book2.xls, book3.xls and so on. What is the easiest way to import the tab named sheet1 from each of...
7
by: ivancycheng | last post by:
I have around 400 excel files with same format (multiple sheets) and wants to import few sheets from excel to MS Access (XP version) for further processing. any one can advise me how to do it? (I'm...
0
by: zizi2 | last post by:
Hi, how do I output multiple excel files from one source using vbscript? Regards, Noluthando
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.