Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SQL stored procedure using values from cells into Pivot Table
I'm calling a stored procedure on our SQL server to generate a pivot
table. I want to be able to set one worksheet cell to a "start date" value and one to an "end date" value, then have the stored procedure called with these cell values as arguments @start and @end. I think I am almost there but I don't know how to get the value from the cell into the Pivot Table properties. If I open the Script Editor, I see the section <x:PTSource ...snip.. <x:QuerySource ...snip.. <x:CommandTextexec sp_sales '2/1/2006', '2/28/2006';</x:CommandText ...snip... </x:QuerySource </x:PTSource If I change the values in the CommandText line, it make the Pivot Table use those arguments the next time I refresh it. This is exactly what I want, but I want to have the values of, say, cells A1 and A2 instead of '2/1/2006' and '2/28/2006'. Any ideas? I'm a super-noobie at programming in Excel, I'm sure this must have a simple answer. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
datasource from stored procedure to pivot table | Excel Discussion (Misc queries) | |||
Copying values from pivot table to cells outside pivot table | Excel Discussion (Misc queries) | |||
execute stored procedure | Excel Programming | |||
Run a stored procedure in Excel 2K | Excel Programming | |||
Execute stored procedure using DAO | Excel Programming |