Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Extracting excel data using script task

$
0
0

Hi All,

I have a requirement in which the task is to read data from .xls file and put it into a text file. The SSIS should read data from Excel cell A:4 to L:15 and also it should capture 1/16/2015 in a seperate column. The Month-Year value on the row is dynamic. Every month old month-year gets deleted and new month-year gets added to the excel sheet. For example one month from now, Feb-15 will be deleted and Jan-16 will be added to the end.

I tried this using SELECT * FROM [SHEET1$A4:L15], then i used unpivot transformtaion to get my data. But when i tried changing for example Mar-15 to March-15 it failed bcoz metada has changed. similarly suppose if i delete Feb-15 and add Jan-16 again my package failed. I think we  need to use script transformation to do this.  any idea how to do it using script.

Any help would be greatly appreciated.

I am using SSIS 2008R2

I have attached the input file(Excel Sheet) and also i have attached the expected output file(Text File).


Viewing all articles
Browse latest Browse all 24688

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>