Adding query results to Excel
HiI found out that I needed to add some results from a Query to an Excel spreadsheet. The Pivot Query gives the following result:
January February May June July September October November
T Data Data Data Data Data Data Data Data
B Data Data Data HERE Data Data Data Data
F Data Data Data Data Data Data Data Data
Now I need to take for instance the value for B, June - and get it out so I can add it to a specific Excel cell, and then I need to take T,February and add that to a different Excel Cell. I use this to add to the Excel sheet:
Dim objXL As Excel.Application
Dim strMyData As String
strMyData = <This is where I need the value>
Set objXL = New Excel.Application
objXL.Visible = True
objXL.Workbooks.Add
objXL.Cells(1, 1).Formula = strMyData
But again I don't know how to pull the specific data from the query.
