dbTalk Databases Forums  

Export to Excel with different sources

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Export to Excel with different sources in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Trond
 
Posts: n/a

Default Export to Excel with different sources - 04-01-2004 , 06:31 AM






I have created this report generator where the user should be able to
export the result to an Excel file. The users can pick their own
columns from a wide range of columns and a sourcetable(report_table)
will be created every time a user choose 'Export to Excel'. Is it
possible to create a DTS task which exports my
sourcetable(report_temp) to an Excel file independent on the
tablestructure is the sourcetable?

Thanks in advance!

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Export to Excel with different sources - 04-01-2004 , 07:10 AM






What you would ideally need to do if using DTS is;

1. Use an ExecuteSQL task to create the Table/named range in Excel
2. Drop all existing transformations
3. Create your SourceSQLStatement based on your user choices
4. Recreate the transformations
5. Pump the data.

You would do all this in an Active Script task up front of the DataPump.
DTS is not very nice to you when you change the metadata.

--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Trond" <trond_wahlstrom (AT) hotmail (DOT) com> wrote

Quote:
I have created this report generator where the user should be able to
export the result to an Excel file. The users can pick their own
columns from a wide range of columns and a sourcetable(report_table)
will be created every time a user choose 'Export to Excel'. Is it
possible to create a DTS task which exports my
sourcetable(report_temp) to an Excel file independent on the
tablestructure is the sourcetable?

Thanks in advance!



Reply With Quote
  #3  
Old   
Raynman
 
Posts: n/a

Default RE: Export to Excel with different sources - 04-05-2004 , 09:16 PM



Shees Trond, Are you sure you don't work for the same company I do

I must do essentially the same thing, but I was thinking more along the line of using a predefined view for this task, (Not creating a throw away temp table. and calling a stored procedure. passing in the Where clause information
O
Once I create the pump package on this view would I be able to save the package and reuse it passing in the statements for the where clause
Is this something I can do

I'm still designing my solution so I'm open for suggestion

If anyone has any suggestions that would be great.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.