Create A Macro To Import Multiple CSV Files To Microsoft Access

preview_player
Показать описание
In this tutorial, I am going to share a VBA script to auto import CSV/TXT/Excel files to Microsoft Access Database.

So this is a script I use almost everyday when I download my YouTube analytics reports and I need to import the files to my Access database. The advantage using a script to import your data files is when you have multiple files you need to import, a single action will finish the job.

► Buy Me a Coffee? Your support is much appreciated!
-------------------------------------------------------------------------------------
☕ Venmo: @Jie-Jenn

► Support my channel so I can continue making free contents
---------------------------------------------------------------------------------------------------------------

#MSAccess #ImportFiles
Рекомендации по теме
Комментарии
Автор

Thanks a lot for sharing this! It’s truly a time saver!

kathylu
Автор

Congratulations ! It was very helpfull to me !

jffranca
Автор

Many thanks! It's helps a lot!! Great work!

joaovictorbarrosdasilva
Автор

Hi, this is a great video. Can you please help with two points below:
1. The data would be in different sheets. I believe here only path has to be modified right? And file_name would be now sheet_name
2. While doing normal import I get options to select primary_key(I want none but by default it keeps the first column as key so i change that option every time) and select the data type which I have to set as date for some defined columns in each sheet. Is there any way to automate these?
Thanks anyway, this video was helpful to me

personalaccount
Автор

I need to use a specific Spec when importing files.
How can you utilize spec usage with this method?
Great vid, thanks for this.

benc
Автор

Anyway to do this with xlsx? I changed "csv" to "xlsx" but it keeps showing me error 31519 saying "You cannot import this file"

Tryswipe
Автор

Hello great video, very helpful. Unfortunately its failing to import csv with names exceeding a certain number say if the csv is saved with more than 26 characters. Any help on such ?

keshoweatherz
Автор

Can you help with a work around for the error message to store local object for importing run time error 3011 the Microsoft access database engine could not find the object…

jasminlewis
Автор

Thanks but I tried this for a table with a date time column and unfortunately it wouldn't work. It would keep giving me an error.

Bobo-wlbs
Автор

Oops. "can't execute code in break mode"

theboyholty
Автор

hello Jie,
thanks so much, please advise if we have way to add all imported tables into 1 table with macro instead of importing them into individual table with sheet name then import them 1 by 1 I have more than 30 CSV file, it will be really appreciated and sorry for any inconvenience

noname
Автор

Hello Jie, You got a new subscribe. I have a little problem, I do get the msgbox "Data loaded" but it is not loading any files i have in directory. I only see Macros and Modules but no Tables

giogobronidze
Автор

Hi Jie the macro works amazing but i found that if i rerun the macro to import new csv files the previously loaded data gets duplicated. Is there away to avoid that

omarabbas
Автор

Thanks for this, is it possible to import files which are Pipe separated?

manjuviswam
Автор

can you explain how can i get this tabels from access to sql by macro?

KarinS-tkqt
Автор

Please, zoom the video. I didn't see a thing.

henrysen-opoku