PC Review


Reply
Thread Tools Rate Thread

500 Excel Spreadsheets

 
 
NotGood@All
Guest
Posts: n/a
 
      21st Apr 2009
I have about 500 excel spreadsheets that I need to import into Access. I did
the first 150 by hand and all of them are the same so I would like to create
a macro to do the rest but I don’t know what to do! I do the following by
hand. File/get external data/import – double click the file – click next –
click 'first row contains column headings' – click OK – click finish – click
yes to overwite existing table -- I get a window saying finished importing
file – click OK -- Then I go to 3 queries that I run to import the temp
table, update the name columns, and the 3rd query I have to modify before I
run it. It updates a field that says what spreadsheet the information came
from. Can I create a macro to complete these steps??
--
NotGood@All
 
Reply With Quote
 
 
 
 
Ken Snell MVP
Guest
Posts: n/a
 
      21st Apr 2009
Probably be a lot easier to use VBA code:

Import Data from Specific Worksheets in All EXCEL Files in a single Folder
via TransferSpreadsheet
http://www.accessmvp.com/KDSnell/EXC...ImpFldWrkFiles

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


"NotGood@All" <(E-Mail Removed)> wrote in message
news:F722F869-D7EE-442F-8DC6-(E-Mail Removed)...
>I have about 500 excel spreadsheets that I need to import into Access. I
>did
> the first 150 by hand and all of them are the same so I would like to
> create
> a macro to do the rest but I don't know what to do! I do the following by
> hand. File/get external data/import - double click the file - click
> next -
> click 'first row contains column headings' - click OK - click finish -
> click
> yes to overwite existing table -- I get a window saying finished
> importing
> file - click OK -- Then I go to 3 queries that I run to import the temp
> table, update the name columns, and the 3rd query I have to modify before
> I
> run it. It updates a field that says what spreadsheet the information
> came
> from. Can I create a macro to complete these steps??
> --
> NotGood@All



 
Reply With Quote
 
open a adobe file from a command button
Guest
Posts: n/a
 
      21st Apr 2009
Ken, thanks. Can you get me started??

"Ken Snell MVP" wrote:

> Probably be a lot easier to use VBA code:
>
> Import Data from Specific Worksheets in All EXCEL Files in a single Folder
> via TransferSpreadsheet
> http://www.accessmvp.com/KDSnell/EXC...ImpFldWrkFiles
>
> --
>
> Ken Snell
> <MS ACCESS MVP>
> http://www.accessmvp.com/KDSnell/
>
>
> "NotGood@All" <(E-Mail Removed)> wrote in message
> news:F722F869-D7EE-442F-8DC6-(E-Mail Removed)...
> >I have about 500 excel spreadsheets that I need to import into Access. I
> >did
> > the first 150 by hand and all of them are the same so I would like to
> > create
> > a macro to do the rest but I don't know what to do! I do the following by
> > hand. File/get external data/import - double click the file - click
> > next -
> > click 'first row contains column headings' - click OK - click finish -
> > click
> > yes to overwite existing table -- I get a window saying finished
> > importing
> > file - click OK -- Then I go to 3 queries that I run to import the temp
> > table, update the name columns, and the 3rd query I have to modify before
> > I
> > run it. It updates a field that says what spreadsheet the information
> > came
> > from. Can I create a macro to complete these steps??
> > --
> > NotGood@All

>
>
>

 
Reply With Quote
 
Ken Snell MVP
Guest
Posts: n/a
 
      22nd Apr 2009
Get you started? That is what the example code at the link I provided is
intended to do.

I have no knowledge of your database setup, your EXCEL workbooks /
worksheets and their structure, etc. So there's no way I can provide
specific suggestions at this time.
--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/



"open a adobe file from a command button"
<(E-Mail Removed)> wrote in
message news:25E12C8A-A7B2-4630-A794-(E-Mail Removed)...
> Ken, thanks. Can you get me started??
>
> "Ken Snell MVP" wrote:
>
>> Probably be a lot easier to use VBA code:
>>
>> Import Data from Specific Worksheets in All EXCEL Files in a single
>> Folder
>> via TransferSpreadsheet
>> http://www.accessmvp.com/KDSnell/EXC...ImpFldWrkFiles
>>
>> --
>>
>> Ken Snell
>> <MS ACCESS MVP>
>> http://www.accessmvp.com/KDSnell/
>>
>>
>> "NotGood@All" <(E-Mail Removed)> wrote in message
>> news:F722F869-D7EE-442F-8DC6-(E-Mail Removed)...
>> >I have about 500 excel spreadsheets that I need to import into Access.
>> >I
>> >did
>> > the first 150 by hand and all of them are the same so I would like to
>> > create
>> > a macro to do the rest but I don't know what to do! I do the following
>> > by
>> > hand. File/get external data/import - double click the file - click
>> > next -
>> > click 'first row contains column headings' - click OK - click finish -
>> > click
>> > yes to overwite existing table -- I get a window saying finished
>> > importing
>> > file - click OK -- Then I go to 3 queries that I run to import the
>> > temp
>> > table, update the name columns, and the 3rd query I have to modify
>> > before
>> > I
>> > run it. It updates a field that says what spreadsheet the information
>> > came
>> > from. Can I create a macro to complete these steps??
>> > --
>> > NotGood@All

>>
>>
>>



 
Reply With Quote
 
NotGood@All
Guest
Posts: n/a
 
      22nd Apr 2009
Ken, thanks, I missed that!
--
NotGood@All


"Ken Snell MVP" wrote:

> Get you started? That is what the example code at the link I provided is
> intended to do.
>
> I have no knowledge of your database setup, your EXCEL workbooks /
> worksheets and their structure, etc. So there's no way I can provide
> specific suggestions at this time.
> --
>
> Ken Snell
> <MS ACCESS MVP>
> http://www.accessmvp.com/KDSnell/
>
>
> --
>
> Ken Snell
> <MS ACCESS MVP>
> http://www.accessmvp.com/KDSnell/
>
>
>
> "open a adobe file from a command button"
> <(E-Mail Removed)> wrote in
> message news:25E12C8A-A7B2-4630-A794-(E-Mail Removed)...
> > Ken, thanks. Can you get me started??
> >
> > "Ken Snell MVP" wrote:
> >
> >> Probably be a lot easier to use VBA code:
> >>
> >> Import Data from Specific Worksheets in All EXCEL Files in a single
> >> Folder
> >> via TransferSpreadsheet
> >> http://www.accessmvp.com/KDSnell/EXC...ImpFldWrkFiles
> >>
> >> --
> >>
> >> Ken Snell
> >> <MS ACCESS MVP>
> >> http://www.accessmvp.com/KDSnell/
> >>
> >>
> >> "NotGood@All" <(E-Mail Removed)> wrote in message
> >> news:F722F869-D7EE-442F-8DC6-(E-Mail Removed)...
> >> >I have about 500 excel spreadsheets that I need to import into Access.
> >> >I
> >> >did
> >> > the first 150 by hand and all of them are the same so I would like to
> >> > create
> >> > a macro to do the rest but I don't know what to do! I do the following
> >> > by
> >> > hand. File/get external data/import - double click the file - click
> >> > next -
> >> > click 'first row contains column headings' - click OK - click finish -
> >> > click
> >> > yes to overwite existing table -- I get a window saying finished
> >> > importing
> >> > file - click OK -- Then I go to 3 queries that I run to import the
> >> > temp
> >> > table, update the name columns, and the 3rd query I have to modify
> >> > before
> >> > I
> >> > run it. It updates a field that says what spreadsheet the information
> >> > came
> >> > from. Can I create a macro to complete these steps??
> >> > --
> >> > NotGood@All
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
NotGood@All
Guest
Posts: n/a
 
      24th Apr 2009
Ken, thanks. I used the “Import Data from ALL Excel Files in a single folder
via transferspreadsheet” and it works great. One last question on this
subject. Can you tell me how to import the file name along with the data. I
need to show whick spreadsheet the information comes from.

Thanks again
--
NotGood@All


"NotGood@All" wrote:

> Ken, thanks, I missed that!
> --
> NotGood@All
>
>
> "Ken Snell MVP" wrote:
>
> > Get you started? That is what the example code at the link I provided is
> > intended to do.
> >
> > I have no knowledge of your database setup, your EXCEL workbooks /
> > worksheets and their structure, etc. So there's no way I can provide
> > specific suggestions at this time.
> > --
> >
> > Ken Snell
> > <MS ACCESS MVP>
> > http://www.accessmvp.com/KDSnell/
> >
> >
> > --
> >
> > Ken Snell
> > <MS ACCESS MVP>
> > http://www.accessmvp.com/KDSnell/
> >
> >
> >
> > "open a adobe file from a command button"
> > <(E-Mail Removed)> wrote in
> > message news:25E12C8A-A7B2-4630-A794-(E-Mail Removed)...
> > > Ken, thanks. Can you get me started??
> > >
> > > "Ken Snell MVP" wrote:
> > >
> > >> Probably be a lot easier to use VBA code:
> > >>
> > >> Import Data from Specific Worksheets in All EXCEL Files in a single
> > >> Folder
> > >> via TransferSpreadsheet
> > >> http://www.accessmvp.com/KDSnell/EXC...ImpFldWrkFiles
> > >>
> > >> --
> > >>
> > >> Ken Snell
> > >> <MS ACCESS MVP>
> > >> http://www.accessmvp.com/KDSnell/
> > >>
> > >>
> > >> "NotGood@All" <(E-Mail Removed)> wrote in message
> > >> news:F722F869-D7EE-442F-8DC6-(E-Mail Removed)...
> > >> >I have about 500 excel spreadsheets that I need to import into Access.
> > >> >I
> > >> >did
> > >> > the first 150 by hand and all of them are the same so I would like to
> > >> > create
> > >> > a macro to do the rest but I don't know what to do! I do the following
> > >> > by
> > >> > hand. File/get external data/import - double click the file - click
> > >> > next -
> > >> > click 'first row contains column headings' - click OK - click finish -
> > >> > click
> > >> > yes to overwite existing table -- I get a window saying finished
> > >> > importing
> > >> > file - click OK -- Then I go to 3 queries that I run to import the
> > >> > temp
> > >> > table, update the name columns, and the 3rd query I have to modify
> > >> > before
> > >> > I
> > >> > run it. It updates a field that says what spreadsheet the information
> > >> > came
> > >> > from. Can I create a macro to complete these steps??
> > >> > --
> > >> > NotGood@All
> > >>
> > >>
> > >>

> >
> >
> >

 
Reply With Quote
 
Ken Snell MVP
Guest
Posts: n/a
 
      26th Apr 2009
You can't import the filename with the original data in the
TransferSpreadsheet action via VBA TransferSpreadsheet. You could do it if
you have a column in EXCEL that ocntains the filename, then the filename
would be one of the imported columns. Otherwise, you'd need to run an update
query after the TransferSpreadsheet action, where the update query writes
the filename into a existing field in the table into which you imported the
spreadsheet's data.

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


"NotGood@All" <(E-Mail Removed)> wrote in message
news:71D5580E-15C2-473B-B2C4-(E-Mail Removed)...
> Ken, thanks. I used the "Import Data from ALL Excel Files in a single
> folder
> via transferspreadsheet" and it works great. One last question on this
> subject. Can you tell me how to import the file name along with the data.
> I
> need to show whick spreadsheet the information comes from.
>
> Thanks again
> --
> NotGood@All
>
>
> "NotGood@All" wrote:
>
>> Ken, thanks, I missed that!
>> --
>> NotGood@All
>>
>>
>> "Ken Snell MVP" wrote:
>>
>> > Get you started? That is what the example code at the link I provided
>> > is
>> > intended to do.
>> >
>> > I have no knowledge of your database setup, your EXCEL workbooks /
>> > worksheets and their structure, etc. So there's no way I can provide
>> > specific suggestions at this time.
>> > --
>> >
>> > Ken Snell
>> > <MS ACCESS MVP>
>> > http://www.accessmvp.com/KDSnell/
>> >
>> >
>> > --
>> >
>> > Ken Snell
>> > <MS ACCESS MVP>
>> > http://www.accessmvp.com/KDSnell/
>> >
>> >
>> >
>> > "open a adobe file from a command button"
>> > <(E-Mail Removed)> wrote in
>> > message news:25E12C8A-A7B2-4630-A794-(E-Mail Removed)...
>> > > Ken, thanks. Can you get me started??
>> > >
>> > > "Ken Snell MVP" wrote:
>> > >
>> > >> Probably be a lot easier to use VBA code:
>> > >>
>> > >> Import Data from Specific Worksheets in All EXCEL Files in a single
>> > >> Folder
>> > >> via TransferSpreadsheet
>> > >> http://www.accessmvp.com/KDSnell/EXC...ImpFldWrkFiles
>> > >>
>> > >> --
>> > >>
>> > >> Ken Snell
>> > >> <MS ACCESS MVP>
>> > >> http://www.accessmvp.com/KDSnell/
>> > >>
>> > >>
>> > >> "NotGood@All" <(E-Mail Removed)> wrote in
>> > >> message
>> > >> news:F722F869-D7EE-442F-8DC6-(E-Mail Removed)...
>> > >> >I have about 500 excel spreadsheets that I need to import into
>> > >> >Access.
>> > >> >I
>> > >> >did
>> > >> > the first 150 by hand and all of them are the same so I would like
>> > >> > to
>> > >> > create
>> > >> > a macro to do the rest but I don't know what to do! I do the
>> > >> > following
>> > >> > by
>> > >> > hand. File/get external data/import - double click the file -
>> > >> > click
>> > >> > next -
>> > >> > click 'first row contains column headings' - click OK - click
>> > >> > finish -
>> > >> > click
>> > >> > yes to overwite existing table -- I get a window saying finished
>> > >> > importing
>> > >> > file - click OK -- Then I go to 3 queries that I run to import
>> > >> > the
>> > >> > temp
>> > >> > table, update the name columns, and the 3rd query I have to modify
>> > >> > before
>> > >> > I
>> > >> > run it. It updates a field that says what spreadsheet the
>> > >> > information
>> > >> > came
>> > >> > from. Can I create a macro to complete these steps??
>> > >> > --
>> > >> > NotGood@All
>> > >>
>> > >>
>> > >>
>> >
>> >
>> >



 
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 Excel Spreadsheets be saved as Microsoft Works spreadsheets? =?Utf-8?B?RVhDRUwgV09SS1MgQ09ORlVTRUQ=?= Microsoft Excel Misc 4 18th Aug 2006 11:21 PM
Excel 2003 loses the links to other excel spreadsheets on a server =?Utf-8?B?TWFyayBhdCBTTVM=?= Microsoft Excel Misc 0 1st May 2006 02:55 PM
How do I combine data from various Excel spreadsheets into one Excel spreadsheets SouthAfricanStan Microsoft Excel Programming 1 29th Jan 2006 05:01 PM
Access 2000 with linked Excel spreadsheets underneath and an Excel PivotTable on top Paul Microsoft Access External Data 2 19th Feb 2004 10:19 PM
converting wk4 & wks spreadsheets to office 2000 excel spreadsheets liz Microsoft Excel Worksheet Functions 2 17th Oct 2003 02:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:10 PM.