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

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Import Latest Excel File Into New Table, Access 2013    
 
   
post Sep 4 2019, 04:02 PM
Post#1








I'd like to create some code to import certain Excel files from a directory location into a new table. There are several Excel files created each day/hour and placed in a specific share drive location and named "Routing_Point_Closed_Report_2019-09-04_04-00-PM". How do I import where todays date matches the date in the file name and the time in the file name is 04-00-PM? Can someone offer some code for me?
This post has been edited by slc1axj: Sep 4 2019, 04:09 PM
Go to the top of the page
 
theDBguy
post Sep 4 2019, 04:06 PM
Post#2


UA Moderator
Posts: 76,821
Joined: 19-June 07
From: SunnySandyEggo


Hi. By "latest," can we assume you mean by the "Modified Date" property?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
post Sep 4 2019, 04:10 PM
Post#3








I've revised the post - I'm kinda wanting to search the file name in order to find the file to import into Access.
Go to the top of the page
 
theDBguy
post Sep 4 2019, 04:26 PM
Post#4


UA Moderator
Posts: 76,821
Joined: 19-June 07
From: SunnySandyEggo


Hi. You could try something like:
CODE
Dir("Routing_Point_Closed_Report_" & Format(Date(),"yyyy-mm-dd") & "_04-00-PM.xlsx")

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
MadPiet
post Sep 4 2019, 04:30 PM
Post#5



Posts: 3,364
Joined: 27-February 09



?Format(date(),"YYYY-MM-DD") &"_04-00-PM"
2019-09-04_04-00-PM
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    7th December 2019 - 08:12 PM