#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 51
Default Import File Data

Hi,

In a folder I have 10 excel files and I want to copy sheet2 data of
all the exel file from the folder.
Copied data will be pasted in a book.xlsx.
Is it possible ?

Eg, Folder called ABC and in that 10 excel files 001.xlsx,
002.xlsx........

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,123
Default Import File Data

Hi,

You can use this add-in if you want it easy
http://www.rondebruin.nl/merge.htm

Or see the code links on that page

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




wrote in message ...
Hi,

In a folder I have 10 excel files and I want to copy sheet2 data of
all the exel file from the folder.
Copied data will be pasted in a book.xlsx.
Is it possible ?

Eg, Folder called ABC and in that 10 excel files 001.xlsx,
002.xlsx........

Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Import File Data

This is just a demo. I have three files in a folder called "test". I open
the files sequentially and copy sheet2 of each file to the original sheet and
save the original as book.xls. Change the extension to match your needs:

Sub sheeet2()
Dim s(10) As String, wb As Workbook
Dim wbt As Workbook
s(0) = "C:\test\alpha.xls"
s(1) = "C:\test\beta.xls"
s(2) = "C:\test\gamma.xls"
Set wb = ActiveWorkbook
For i = 0 To 2
Workbooks.Open Filename:=s(i)
Set wbt = ActiveWorkbook
Sheets("Sheet2").Copy Befo=wb.Sheets(1)
wbt.Close
wb.Activate
Next
ActiveWorkbook.SaveAs Filename:="C:\test\book.xls"
End Sub

--
Gary''s Student - gsnu2007L


" wrote:

Hi,

In a folder I have 10 excel files and I want to copy sheet2 data of
all the exel file from the folder.
Copied data will be pasted in a book.xlsx.
Is it possible ?

Eg, Folder called ABC and in that 10 excel files 001.xlsx,
002.xlsx........

Thanks in advance

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 51
Default Import File Data

Thanks ron,

that's really nice one.

I am not suppose to use add ins in office, If u provide code that will
be helpful.


On Mar 15, 4:17*pm, "Ron de Bruin" wrote:
Hi,

You can use this add-in if you want it easyhttp://www.rondebruin.nl/merge..htm

Or see the code links on that page

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

wrote in ...
Hi,


In a folder I have 10 excel files and I want to copy sheet2 data of
all the exel file from the folder.
Copied data will be pasted in a book.xlsx.
Is it possible ?


Eg, Folder called ABC and in that 10 excel files 001.xlsx,
002.xlsx........


Thanks in advance


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,123
Default Import File Data

See the "More Information" part of the page for the code links

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




wrote in message ...
Thanks ron,

that's really nice one.

I am not suppose to use add ins in office, If u provide code that will
be helpful.


On Mar 15, 4:17 pm, "Ron de Bruin" wrote:
Hi,

You can use this add-in if you want it easyhttp://www.rondebruin.nl/merge.htm

Or see the code links on that page

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

wrote in ...
Hi,


In a folder I have 10 excel files and I want to copy sheet2 data of
all the exel file from the folder.
Copied data will be pasted in a book.xlsx.
Is it possible ?


Eg, Folder called ABC and in that 10 excel files 001.xlsx,
002.xlsx........


Thanks in advance


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import data from zip file through Internet Eric Excel Discussion (Misc queries) 3 December 4th 08 03:34 PM
How to import data from a zipped file through Internet? Eric Excel Discussion (Misc queries) 0 December 3rd 08 04:41 PM
USING DATA FROM AN EXCEL FILE TO IMPORT INTO ANOTHER Andrew Pickles Excel Worksheet Functions 1 January 17th 07 08:30 PM
import multiline data from text file Razorback76 Excel Discussion (Misc queries) 0 June 20th 06 06:13 AM
import data from a text file jonny365 Excel Discussion (Misc queries) 0 September 6th 05 03:42 PM


All times are GMT +1. The time now is 07:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"