Click here to Skip to main content
15,886,038 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am looking to export values from database directly to excel to particular column since remaining column as formulas in it.


What I have tried:

I am looking to export values from database directly to excel to particular column since remaining column as formulas in it.
Posted
Updated 27-Feb-19 23:25pm
Comments
Richard MacCutchan 28-Feb-19 4:37am    
Where exactly are you looking?
Maciej Los 28-Feb-19 5:09am    
Good question!
Richard MacCutchan 28-Feb-19 5:12am    
Or rather just as bad as the original. :)
Maciej Los 28-Feb-19 5:41am    
:laugh:
There's a small difference between OP's question and yours, Richard. Your question is reasonable, when OP's question is not a question at all. It's a statement about what he/she is doing now... But what he wants, we can only guess...

1 solution

The simplest way to achieve that via VBA code is to:
1. Create ADODB.Connection[^] to be able to connect to your database
2. Create ADODB.Recordset[^] to open it and grab/fetch data into it
3. Use Range.CopyFromRecordset[^] method in Excel to copy data from recordset object

In C# or VB.NET - the way to achieve that is bit different...

Without specific details, i can't help you more.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900