473,806 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5945

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.space s.live.com/Blog/cns!A68482B9628 A842A!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********@hot mail.comwrote in message
news:eT******** ******@TK2MSFTN GP02.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********@hot mail.comwrote in message
news:eT******** ******@TK2MSFTN GP02.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********@hot mail.comwrote in message
news:eT******** ******@TK2MSFTN GP02.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
6686
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 with minimum user-interface...If there is anyone out there that can help... please feel free to share!:) PS... Using MSOffice 2000 Example: Table1
4
5211
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 advanced. rgds,
0
1634
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 have both # and text in > the same column. The coloumn names in each excel file are mostly same > but still a lot of different names(items). I was told to set up import > specification, but how? i am not a programer or not access > professional,...
1
4919
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 packages and schedule jobs, so I would need some help. Thank you Inna
3
7835
by: theodorej | last post by:
......how do I select multiple Excel files to import into Access? Any insights would be deeply appreciated.
28
19271
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 import them into Access using a button. The data contained in the excel files is similar, so there should no formatting issues while importing. I searched through the forums and found the code by mmccarthy for importing excel files. I tried using...
2
4455
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 the excel files to a databse using SQL server 2000 enterprise edition? Regards, Ciarán
7
7248
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 very new in using VB). Many Thanks!
0
1523
by: zizi2 | last post by:
Hi, how do I output multiple excel files from one source using vbscript? Regards, Noluthando
0
9719
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9598
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10111
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7650
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3852
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.