Archive

Posts Tagged ‘Excel’

Creating Excel Files (.xls) dynamically from SSIS

January 11th, 2011 admin 12 comments

In this blog, I will walk you through the creation of excel files ( xls / Excel 2003)  dynamically through SSIS.

Scenario: every day one of my process runs to pull data from SQL server table to excel file. I need to use unique file everyday with name as “taxonomy_<date>.xls” , for example on 14th of January 2011 the file name should be “Taxonomy_01142011.xls” with the excel sheet name “TaxonomyValues”.

It is pretty simple to create this file dynamically. At first we need to set up an excel connection manager pointing to the file. The connection manager needs to be dynamically configured to point to the correct file everyday, in our case “Taxonomy_01142011.xls” on 14th Jan. To do this,

  1. go to properties window of the excel connection manager
  2. click on expression and the browse ( … symbol) and choose “excel File Path” property. ( please refer the pictures below)
  3. Copy and paste the expression given below or develop similar expression. Click on evaluate expression and it will display the file path as evaluated value.

“C:\\Taxonomy_”+ (MONTH( GETUTCDATE()  ) < 10? “0 “+(DT_WSTR,2) MONTH( GETUTCDATE()  ) :( DT_WSTR,2)MONTH( GETUTCDATE()  ))

+(DAY( GETUTCDATE()  ) < 10? “0 “+(DT_WSTR,2) DAY( GETUTCDATE()  ) :( DT_WSTR,2)DAY( GETUTCDATE()  ))

+(DT_WSTR,4)YEAR( GETUTCDATE()  ) +”.xls”

Also you need to use the settings as below for connection manager ( for .xls files)

 

Read more…

Use Office Excel 2010 to writeback / insert data into SSAS cubes

October 21st, 2010 admin No comments

According to me Excel is one of the best tools ever produced by Microsoft. In this post , I will talk to you on a new feature from Excel.

Every time you try to change a cell in excel pivot tables you will come across this error.

Writeback is a new feature available in excel to overcome this. The  new feature seems to unlock the final goal for writeback by providing a desktop user the ability to change specific values. The feature also helps adding the changes the to the cube quickly doesn’t require the cube to be processed. Once the changes are committed by a desktop user, the changes will be visible to other users on refresh.

 Note: Before enabling the writeback functionality from excel, remember to do the necessary changes in cubes (using partitions) to support writeback functionality.

The steps and screenshots below will help you in configuring writeback functionality from excel pivot tables.

Step 1:

Click on value columns in the pivot table generated from cubes. Navigate to menu PivotTable-> Options and click on “what if Analysis” as shown in the screen shot below.

Read more…

SSIS Error : Resolve transformation errors in 64-bit version of SSIS in debug mode

September 21st, 2010 admin No comments

In 64 bit operating systems, SSIS transformations ( especially excel) and tasks throws errors that could be annoying. You will often come across errors as shown below.

SSIS package “Package.dtsx” starting.

Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.

Error: 0xC00F9304 at Package, Connection manager “Excel Connection Manager“: SSIS Error Code DTS_E_OLEDB_EXCEL_NOT_SUPPORTED: The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider is available. Read more…