Web design and hosting, database, cloud and social media solutions that deliver business results
  • Business Solutions
    • Robotic Process Automation
    • Bespoke Software
    • Database Services
      • Data Integration
      • Datawarehouse Services
      • Power BI
      • Server Upgrade and DBA Services
    • Web Services
      • Logo Design
      • Payment Gateways
      • Web Localisation and Translation
      • Web Site Optimisation
      • Web Site Security
      • Technical Tools
    • Cloud Services
      • Amazon Web Services
      • Google Cloud Services
      • Microsoft Azure
    • Microsoft 365
      • Enabling the Multi Factor Authentication Application
      • Office 365 DNS Settings Generator
    • IT Hardware
    • Social Media Services
  • Academy
    • Our Test Environment
    • Learning Databases
      • The Basics
      • Get Open Query
      • SQL Server Data
      • SQL Server Maintenance
      • Using SQL Server Dates
      • Using SQL Server Functions
      • Using SQL Server Pivot-Unpivot
      • Technical Tools
    • Learning Web Design
      • Building Ousia Content Management System
      • Using ASP-NET
      • Using CSS
      • Using JavaScript
    • Learning Cloud and IT Services
      • Task Scheduler Error 2147943645
      • Blocking Blank Senders
      • Requesting SSL and Generation of PFX file in OpenSSL Simple Steps
    • Using Social Media
      • Asking for a Google Review
      • Changing a Facebook account from personal to business
      • Choosing where to focus Social Media effort
      • Social Media Image Sizes
      • Using Meta Data to set Social Media Images
  • About
    • Blog
      • Building an entry level gaming machine
      • Google Core Update Jan 2020
      • Hot Chilli Internet Closure
      • How To Choose Content For Your Website Adverts Leaflets
      • Preventing Online Scam
      • Skimmers of the gig economy
      • The most annoying things about websites on the Internet
      • Top 5 websites for free Vector Graphics
    • Careers
      • Translator English-Japanese
      • Translator English-Portuguese
      • Translator English-Spanish
      • Translator English-Turkish
    • Portfolio
    • Regulatory
    • Team
      • Chester Copperpot
      • Gavin Clayton
      • Sai Gangu
      • Suneel Kumar
      • Surya Mukkamala
عربى (AR)čeština (CS)Deutsch (DE)English (EN-GB)English (EN-US)Español (ES)فارسی (FA)Français (FR)हिंदी (HI)italiano (IT)日本語 (JA)polski (PL)Português (PT)русский (RU)Türk (TR)中国的 (ZH)

SSIS, Create a Dynamic Excel file with dynamic Sheet Names

Create a Dynamic Excel File with Dynamic Sheet Names in SSIS. I found this one of the easiest ways to dynamically create an excel file with dynamic sheet names.

Step 1

SaiExcel1.png

Select SQL Task Editor and then in General -> Connection Type -> Select Excel

SaiExcel2.png
And then just below Connection Type in the “Connection” tab select “New Connection” and you will get the image to the right.

Step 3

Create a blank excel file or a dummy File to select the file for the above screen.

Need not worry about headers etc.

Step 4

Select SQL Source Type as “Direct Input”

Step 5

SaiExcel3.png
This is the Key part.

In the SQL Statement tab, write the code just the way we do for creating a table in SQL.

One can create the columns depending on the nature of column types like Varchar, INT, DECIMAL etc.

Here, in the above figure, “” refers to the Sheet name and the rest refers to the columns within the sheet.

Then Click “OK”.

If you want to have multiple sheets, then follow the above steps with multiple SQL Task Editors.

Now, all set for dynamic sheet names
SaiExcel4.png
If you want to have multiple sheets, then follow the above steps with multiple SQL Task Editors.

Now, all set for dynamic sheet names

Step 6

Now if you want to create the excel files dynamically

Select the Excel Connection Manager that is created in the Connection Managers pane and then go to Properties

Step 7

SaiExcel5.png
Click on the navigation pane of Expressions tab and you will be directed to Property Expression Editor Window.

Select “Excel File Path” from the drop down list of the Property tab in the Property Expression Window and click on “Expression” navigation pane.

Step 8

Now you will be directed to Expression builder window where you can build up your expression for the file path and file name for the excel sheet like below.

Check the expression by using “Evaluate Expression” in the bottom and when you are happy click “OK”.

That’s all you are done.

Now when you execute the package, you will see the desired sheet names with desired File name in the desired file path.

Step 9

SaiExcel6.png
Now you will be directed to Expression builder window where you can build up your expression for the file path and file name for the excel sheet like below.

Check the expression by using “Evaluate Expression” in the bottom and when you are happy click “OK”.

That’s all you are done.

Now when you execute the package, you will see the desired sheet names with desired File name in the desired file path.

Author

Helpful?

Please note, this commenting system is still in final testing.
Copyright Claytabase Ltd 2020

Registered in England and Wales 08985867

Site Links

RSSLoginLink Cookie PolicySitemap

Social Media

facebook.com/Claytabaseinstagram.com/claytabase/twitter.com/Claytabaselinkedin.com/company/claytabase-ltd

Get in Touch

+442392064871info@claytabase.co.ukClaytabase Ltd, Unit 3d, Rink Road Industrial Estate, PO33 2LT, United Kingdom

Partnered With

The settings on this site are set to allow all cookies. These can be changed on our Cookie Policy & Settings page.
By continuing to use this site you agree to the use of cookies.
Ousia Logo
Logout
Ousia CMS Loader