[VBA] Connecting Excel to SQL Server

Опубликовано: 14 Апрель 2026
на канале: VeeBeeCoding
44
1

Today we will go over pushing and pulling data between Excel and SQL Server!
This can help in cases where folks are more comfortable doing their calculations and scratch work in excel but need to pull data in from SQL server. You can also push data to SQL server. For example, multiple parties could be submitting budgets, submit general ledger reclass suggestions, share research data, and more.
Being able to push and pull between Excel and SQL server can be a SUPER useful tool! BUT -- don't forget about enforcing security!!
We go through creating a service account that has access to ONLY the tables it needs, using those credentials to connect to the server. We password protect our VBA code to prevent others from viewing the credentials.

"That's a paddlin'" clips - From the show The Simpsons, season 6 episode 21
2RD2 scream - Star Wars

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

🖐Hi! I'm VeeBee, you can call me VB or Bee for short! Over the years during my career I have been keeping a journal of what I have learned when working in different languages and projects.

🏁 My goal is to pass along what I have learned to you by teaching through projects and exercises based on real world experiences.

✨ My promise to you is that I will do my best to not waste time. Each video will have a full summary at the very beginning so that you can determine if you can skip the video if you already know the material, or the summary can be a refresher if you're coming back.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

☕ If you found this tutorial helpful and would like to spot me a coffee as thanks, please consider leaving a small tip or donation on my Ko-Fi site at https://ko-fi.com/veebeecoding.
Tips are never expected, but always appreciated! I plan on creating content regardless, so there is no pressure or obligation to donate.