Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an application that creates multiple Excel files (up to 20) with
different names and different data. What I want to do is create a new file from these with a sheet for each one of these files and then delete them programatically after I have copied the sheet into the new file. Effectively ending up with one file when I am finished. Also is it possible to do this without automation. -- DCD |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bit of a conflict to ask for 'progamatically' make changes and then ask to
do it without automation! If you have control of the program creating the 20 or so workbooks, why not consider wrting these as separate sheets into one workbook in the first instance - you end up with result in one step if this is not possible then you need some coding to merge the workbooks. The code you require otherwise depends on knowing where the filed are located or the names of the files created by the first step. If for example all the files (and only those files) are in one directory path you could just open each one in turn copy contents and paste into a new sheet on your summary workbook. If the files reside with other files then you need a means to identify the relevant files to act upon. Perhaps you might let us know how you would like to see this work. -- Cheers Nigel "Darryl" wrote in message ... I have an application that creates multiple Excel files (up to 20) with different names and different data. What I want to do is create a new file from these with a sheet for each one of these files and then delete them programatically after I have copied the sheet into the new file. Effectively ending up with one file when I am finished. Also is it possible to do this without automation. -- DCD |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nigel,
Thanks for the response. I figured it out actually. The reason I couldn't do it on the first instance is that SQL Reporting Services is creating the files and from what I know about RS you can't combine sheets as it builds the files since that happens behind the scenes. What I wrote seems to work fine except for the orphan process that gets created. I am actually working on that now to see if I can eliminate that also. Thanks again. Darryl -- DCD "Nigel" wrote: Bit of a conflict to ask for 'progamatically' make changes and then ask to do it without automation! If you have control of the program creating the 20 or so workbooks, why not consider wrting these as separate sheets into one workbook in the first instance - you end up with result in one step if this is not possible then you need some coding to merge the workbooks. The code you require otherwise depends on knowing where the filed are located or the names of the files created by the first step. If for example all the files (and only those files) are in one directory path you could just open each one in turn copy contents and paste into a new sheet on your summary workbook. If the files reside with other files then you need a means to identify the relevant files to act upon. Perhaps you might let us know how you would like to see this work. -- Cheers Nigel "Darryl" wrote in message ... I have an application that creates multiple Excel files (up to 20) with different names and different data. What I want to do is create a new file from these with a sheet for each one of these files and then delete them programatically after I have copied the sheet into the new file. Effectively ending up with one file when I am finished. Also is it possible to do this without automation. -- DCD |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening Multiple Workbooks | Excel Discussion (Misc queries) | |||
Opening Multiple Workbooks | Excel Programming | |||
multiple workbooks opening | Excel Programming | |||
Opening multiple workbooks | Excel Programming | |||
Opening Multiple Workbooks | Excel Programming |