I am using VBA开发者_如何学JAVA to pull from a SQL table and it automatically populates cell E14. Not sure why it's that cell, but is there a way to specify which cell it pulls the data into?
Here's what I have right now:
strSQL = "SELECT distinct Source FROM dbo.Simulations WHERE SimulationID = 5
When creating your ODBC connection you end up on a screen like what is shown below. This is where you determine where the data will populate in your spreadsheet. I don't think there is a way to get to that screen after the query has been created, so you may have to create it again and adjust the landing location for the query.
Now if you are doing this via VBA, you'll need to post your code.
精彩评论