August 30, 2010 at 6:23 pm
Hi everyone,
I have an ssis package that creates 4 data sheets in a excel file, the data are comming from some tables in sql server
When I create a excel file, I send that file to some email address.
But my problem is that the excel sheets that are created, are not very user friendly, and I need the headings be shaded, wrapped text, wide enough for the cell contents etc.
Is there any solution for above requirement.
I'll appreciate for any help.
Regards,
August 30, 2010 at 7:51 pm
SSIS will not do this automatically.
However, you can use a vb.net script task, excel automation, and set it all yourself. However, this would imply that you are running excel on a server, and this is not supported.
This article: Automating Excel from SQL Server[/url] might be helpful in figuring out how to utilize Excel Automation. It's designed around using T-SQL, not vb.net, but it should be easily adapted.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
August 30, 2010 at 8:00 pm
Hi WayneS,
Thanks a lot for you response.
Cheers,
Fateme
August 31, 2010 at 2:23 am
Or you could embed some code in an Excel spreadsheet and (maybe) use this blank worksheet as a template.
The SSIS process populates the spreadsheet template with data and when the user opens it they can click on the 'Format' button and the pre-written code executes to tidy things up as required. Or you could make it auto-execute.
The benefit of this approach is the avoidance of the need to install Excel components on your SSIS server.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
August 31, 2010 at 7:55 am
Another option is to use a Script Task to format the spreadsheet after the data has been written. This option should probably be left to the experienced programmer. I do not have the time to explain how to do it.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
September 1, 2010 at 6:15 pm
Thanks a lot Phil and Alvin,
Both solutions will be usefull.
Regards,
Fateme
September 2, 2010 at 6:35 am
Just an idea, but you could use SSIS just to prep the data into staging table(s) and then use SSRS to create a formatted report & create a timed subscription to deliver the Excel file via email.
September 2, 2010 at 7:05 am
WILLIAM MITCHELL (9/2/2010)
Just an idea, but you could use SSIS just to prep the data into staging table(s) and then use SSRS to create a formatted report & create a timed subscription to deliver the Excel file via email.
That should be easier than my solution.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
September 15, 2010 at 6:50 am
Hi there
You could create a template excel wkbook and store it in a template folder... Each time before the package runs - copy the file over to the working folder get the data imported and emailed... LAter on if needed you could rename these files and store it in archive folder...
I recently had to do this and have done it this way... i have documented the process of copying and renaming files and creating excel sheets dynamically and renaming it... i can send them to you if you would like to use them
Cheers
Vani
September 15, 2010 at 6:38 pm
Thanks alot Ten,
I am new in SSRS but I am very eager to know more about that, so I think it's good opportunity to learn more detail about SSRS.
And thanks alot to Vani, could you please send me your solution, because I've done that but I got some issue with column that has numeric value.
I mean sometimes the header format will be copy to all of column's cells.
I'll appreciate for your help.
Regards,
Fateme
February 7, 2014 at 10:03 pm
Hi,
I am facing similar issues. Need to export from SQL table to pre-formated excel sheet.
can u please help me by sending the steps. I am a newbie to SSIS.
Thanks in advance
Naveen
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply