Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
datasource from stored procedure to pivot table rodchar Excel Discussion (Misc queries) 0 March 23rd 09 10:45 PM
Copying values from pivot table to cells outside pivot table richzip Excel Discussion (Misc queries) 4 January 16th 08 11:03 PM
execute stored procedure Mark Goldin Excel Programming 3 April 7th 04 03:03 PM
Run a stored procedure in Excel 2K ArthurB Excel Programming 0 February 26th 04 04:46 PM
Execute stored procedure using DAO sapta wijaya Excel Programming 0 September 29th 03 04:24 AM


All times are GMT +1. The time now is 02:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"