PC Review


Reply
Thread Tools Rate Thread

Append worksheet to another inside a directory

 
 
Marilyn
Guest
Posts: n/a
 
      24th Oct 2009
I'm not sure if my first post got in so I'm reposting this, just in case.

I have hundreds of Time Series Excel files inside a file folder. They all
have the same headers, number of columns, and same data types (but different
number of rows).

The files are categorized by their filenames. Example, 0101010A.xlsx is for
one time period and 0101010B is for another time period. There are only two
categories (A and B) in the entire folder.

I need a code that:
(1) reads and compares the first 8 characters of the filenames in the
directory.

If they are the SAME:
A) Appends contents of file *B to file *A after the last row of file
*A. (Do not append the header from file *B).

Thanks for any advice/help.

Marilyn

 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      24th Oct 2009
You could probably use some of this to get you there.

http://www.rondebruin.nl/copy2.htm

HTH,
Barb Reinhardt

"Marilyn" wrote:

> I'm not sure if my first post got in so I'm reposting this, just in case.
>
> I have hundreds of Time Series Excel files inside a file folder. They all
> have the same headers, number of columns, and same data types (but different
> number of rows).
>
> The files are categorized by their filenames. Example, 0101010A.xlsx is for
> one time period and 0101010B is for another time period. There are only two
> categories (A and B) in the entire folder.
>
> I need a code that:
> (1) reads and compares the first 8 characters of the filenames in the
> directory.
>
> If they are the SAME:
> A) Appends contents of file *B to file *A after the last row of file
> *A. (Do not append the header from file *B).
>
> Thanks for any advice/help.
>
> Marilyn
>

 
Reply With Quote
 
Otto Moehrbach
Guest
Posts: n/a
 
      24th Oct 2009
Marilyn
Your example file names have only 7 characters before the "A" and "B".
Is this just a typo or did I miss something? Read what Barb gave you and if
you need more, post back and I'll work up something for you. HTH Otto
"Marilyn" <(E-Mail Removed)> wrote in message
news:3D93A7B8-4818-45E3-8940-(E-Mail Removed)...
> I'm not sure if my first post got in so I'm reposting this, just in case.
>
> I have hundreds of Time Series Excel files inside a file folder. They all
> have the same headers, number of columns, and same data types (but
> different
> number of rows).
>
> The files are categorized by their filenames. Example, 0101010A.xlsx is
> for
> one time period and 0101010B is for another time period. There are only
> two
> categories (A and B) in the entire folder.
>
> I need a code that:
> (1) reads and compares the first 8 characters of the filenames in the
> directory.
>
> If they are the SAME:
> A) Appends contents of file *B to file *A after the last row of file
> *A. (Do not append the header from file *B).
>
> Thanks for any advice/help.
>
> Marilyn
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I run an append query from inside a form? =?Utf-8?B?R3JldGNoZW4=?= Microsoft Access Forms 6 28th Nov 2006 05:59 PM
Place a variable inside a directory path Brad J. Microsoft Excel Programming 0 24th Jun 2006 04:38 PM
Re: Relative Directory in Append Query John Nurick Microsoft Access External Data 4 24th Sep 2004 06:43 PM
Relative Directory in Append Query =?Utf-8?B?TmV3IFVzZXI=?= Microsoft Access External Data 0 22nd Sep 2004 06:05 PM
How do you import/append to active directory? Matt Microsoft Windows 2000 New Users 0 13th Oct 2003 04:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:58 PM.