August 12, 2012 at 3:54 pm
Ii have an urgent problem and I am thankful for any help.
I do a query based on user-selected parameters and generate a data set. This data set is dumped into an Excel sheet.
Now, I want to take that data set and pivot it to create another table and populate into a second sheet in that Excel file.
I wrote a query for that pivot and that works.
How should I proceed?
1. Should I use the first data set and give this as a parameter to the pivot query? And have it return a data table that I can dump into Excel? How do I do this? Are there other solutions?
The Excel file is created using OpenXML and I do not know how to create a pivot table directly from first sheet into a second jsheet.
Thanks again,
August 13, 2012 at 1:31 am
Not sure if I understood you correctly but... can you do this:
1. Generate first dataset and save it into temp table.
2. Dump to Excel from temp table.
3. Generate pivoted dataset from temp table.
4. Dump result to second sheet in Excel.
--Vadim R.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply