Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Im so confused! Excel SQL Datasource Field Mapping

Status
Not open for further replies.

adamroof

Programmer
Nov 5, 2003
1,107
US
Ok, so ive never done this b4, been searching the forums, using examples, googling, but no sense yet.

I have an excel file that i would like to populate specific fields with data from a MSSQL database. Where the heck do i start? The database is on same network and can use windows auth. It should connect to a stored procedure with two date parameters.

I used to write Access apps, now writing asp.net web apps, so coming back to this might not be so strange if you can kick start me with Excel.

The main goal here is an Excel Chart from the datarange populated. There is about 2 years of preexisting data in the sheet already, so i need to map in the right spots data that used to entered manually, but now is in a sql database.

If this is too noob, can you shoot me some links with examples.
 


Hi,

FIRST, perform the query in a separate sheet. Simplest way is Data/Get External Data/New Database Query -- MSSQL Databases -- your database.....

Once inserted, it nedd only be refreshed to return current data.

Then map from the query table to your chart source data table.

Skip,

[glasses] [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is…
POULTRY in motion to PULLET for a PALTRY amount! [tongue]
 
able to do that with a new sheet, but its a stored proc with a date parameter, and returns about 5 tables.

It showed only one table, couldnt see how to advance or return all.

i had to type in the date in an exec statement, any way to prompt for that?
 


Not sure. I never use stored procedures. I expose each one and then I can manipulate in VBA or via a parameter linked to a cell.

Skip,

[glasses] [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is…
POULTRY in motion to PULLET for a PALTRY amount! [tongue]
 
ooooh, i can link a parameter to a cell?????
 


Check out Data/Get Exsternal Data/Parameters.

Can designate a cell for each parameter & query can run on change in the cell value.

Skip,

[glasses] [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is…
POULTRY in motion to PULLET for a PALTRY amount! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top