Posts

Showing posts with the label Script-Task

SSIS - change excel columns number format from Script Task

Image
Problem: I am exporting Data from SQL Server, utilizing SSIS Data Flow Task. Here all columns appear as Text despite export formatting. Hence I need to develop a SSIS Script task to do the necessary conversion. I am facing trouble in developing the script. I have Tried different options available in the internet. but unsuccessfully. using System ; using System . Data ; using Microsoft . SqlServer . Dts . Runtime ; using System . Windows . Forms ; using System . Diagnostics ; using System . IO ; using System . Drawing ; using System . Runtime . InteropServices ; using Excel = Microsoft . Office . Interop . Excel ; namespace ST_de899f405b7b4083b0ad8cba6b3df2e3 { [ Microsoft . SqlServer . Dts . Tasks . ScriptTask . SSISScriptTaskEntryPointAttribute ] public partial class ScriptMain : Microsoft . SqlServer . Dts . Tasks . ScriptTask . VSTARTScriptObjectModelBase { public void Main () { string inputFile = ( string ) Dts . Variables [ "Ta...