UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Loop through and Import Lots of Excel Sheets to access 97    
 
   
OzzBoz
post Aug 9 2004, 07:04 AM
Post #1

New Member
Posts: 2



Got this problem that I don't know how to fix. I have a reporting database that imports data from another access database and a number of excel files.

I wrote the excel import routine which was OK, but then found out that the users require an initial load from 100s of excell sheets! These are all in one folder and have the same data formats to be imported into the same table.

Sheets are call statistics So a column of times and columns for calls answed/abandoned etc. Sheet Date is in a single cell and I could do with capturing it as a new column.

Firstly, is there a way to loop through all the sheets in a folder one at a time and import the data?

Secondly Is it possible to grab a date from one cell in the sheet headings that has a date and add it as a new column?

Thanks OzzBoz
Go to the top of the page
 
+
TimK
post Aug 9 2004, 08:40 AM
Post #2

UtterAccess VIP
Posts: 6,250
From: Khon Kaen, Thailand



You can use Dir() to help looping thru a given folder for Excel files. Then use DoCmd.TransferSpreadsheet

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "TempTable", strfile, False

Check this Post out.

(IMG:http://www.utteraccess.com/forum/style_emoticons/default/frown.gif)
Go to the top of the page
 
+
OzzBoz
post Aug 9 2004, 10:31 AM
Post #3

New Member
Posts: 2



Cheers Tim - I was being a bit dumb there (IMG:http://www.utteraccess.com/forum/style_emoticons/default/blush.gif)

All done and real quick to. Formatted and used the file name for the date in the end..


(IMG:http://www.utteraccess.com/forum/style_emoticons/default/thanks.gif)
Go to the top of the page
 
+
TimK
post Aug 9 2004, 11:29 PM
Post #4

UtterAccess VIP
Posts: 6,250
From: Khon Kaen, Thailand



Sorry for the link. Try it again, HERE.

(IMG:http://www.utteraccess.com/forum/style_emoticons/default/frown.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 24th May 2013 - 04:55 PM