-
write SQL table output to excel using VBA
Hi,
I've created ODBC connection.Now, I need to connect to tables and write data to excel in 3 different sheets (Tab1,Tab2,Tab3).
I have written code to connect to DSN and a sub procedure which has select statements for 3 tables.(select * from tab1..tab2..tab3)
Can any one suggest the code on how to get the output of these queries to excel in 3 tabs
Thanks in advance
-
-
Assuming the data is returned as either an ADO or DAO Recordset this should help
https://msdn.microsoft.com/en-us/vba...t-method-excel
-
Or just use a query instead of code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules