sql query for excel column values



I have a spreadsheet that I receive daily. there are about anywhere from
50-1000 values in column A that I need to query an sql database for. The
spreadsheet name changes daily and the number of rows change daily. It's
always column A (with a header). I'd like to program excel to start at cell
A2, do the query, return the results to a new workbook, and continue down the
list until the end.

So far I've recorded the macro that sets up the database and returns a
sample query, but I'm not sure how to go about the rest. I know the
variables are the daily file, the number of rows in the dailyfile. How could
I set it up so that it queries each cell value until the end of the data?
Automation is the key here. I'm querying an MS SQL database.
.



Relevant Pages

  • RE: Data Export from Access to Excel
    ... I am able to get the query to run and load the data into the sheet I named ... Is it possible in the Excel sheet to say "in cell A2 I need the name of the ... spreadsheet that pulls information directly from the Access database. ...
    (microsoft.public.excel.misc)
  • Re: DoCmd.TransferSpreadsheet: export from query to excel sheet through VBA
    ... I want to export data from a query to excel sheet using ... The starting cell should be 6 row and ending cell depends on the ... cells or the name of a range in the spreadsheet. ...
    (microsoft.public.access.modulesdaovba)
  • Re: sql query for excel column values
    ... >> 50-1000 values in column A that I need to query an sql database ... >> spreadsheet name changes daily and the number of rows change daily. ... I'd like to program excel to ...
    (microsoft.public.excel.programming)
  • Re: Linking an Excel worksheet to an Access table
    ... Once you got your query in Excel as I explained you ... parameter value from a certain cell. ... I would prefer to use Excel and have the spreadsheet get its ...
    (microsoft.public.office.misc)
  • RE: sql query for excel column values
    ... I only need to query if column AA has a value of "x". ... >> 50-1000 values in column A that I need to query an sql database for. ... >> spreadsheet name changes daily and the number of rows change daily. ... I'd like to program excel to start at cell ...
    (microsoft.public.excel.programming)