Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Biz1705
Starting Member
8 Posts |
Posted - 2010-08-11 : 22:38:29
|
Hi,I am new to using Excel VBA to import into SQL Server 2008.Currently I have 17 files to upload up to 1000 rows manually. Is there a VBA that can load an excel file directly into SQL?It would be faster then loading 1 file at time in SQL import.I was thinking having named range and having SharePoint addresses of xlsm /xlsx files and looping it through.Any suggestions would be greatly appreciated.Biz |
|
jim_jim
Constraint Violating Yak Guru
306 Posts |
Posted - 2010-08-12 : 09:13:58
|
How much data is in each excel fileIf they are simple excel files that need to be loadedI would copy all the 17 excel files into differant sheets of 1 excel file and use the import optionIam not sure if you are trying to load 17 of the excel files to one table?Thanks |
|
|
Biz1705
Starting Member
8 Posts |
Posted - 2010-08-12 : 18:56:25
|
Hi,I have 14 files with 495 rows and 2 1000-1500 rows.I am trying to load it table and then I have SQL script to transform data to other DBs.Need Excel VBA code to upload 17 files in loop so no manual imports to SQL.Biz |
|
|
shafiq
Starting Member
3 Posts |
Posted - 2011-05-12 : 11:31:17
|
Hello All,I got somewhat same situation. On daily basis, 10 excel files get stored in a folder (all files contains same format). I want to upload its data to SQL Server through VBA. I know this can be done by openrowset or openquery of sql server BUT the excel file contains one vba code which does calculations and bring data in a desired table format which need to be uploaded to sql server.First plan, some way trigger this excel vba code from sql server - this would be great!!! Second plan, run vba code from excel file itself. Then upload result data to sql server through vba only ---need vba code for this.I would greatly appreciate all your advice and help. Thanks. |
|
|
|
|
|