Can anybody tell me if we can use the C#.net while encoding in the script tasks components in BI 2005?
View Complete Post
I am using a "Script Task" component. I am trying with following three simple steps:
1) Obtain the excel content in HTML
Dim reportInHtml As String = GenerateHTMLReport()
2) Generate an excel with below code:
Dim message As MailMessage
message = New MailMessage(fromAddress, toAddress, subject, String.Empty)
Using memoryStream As MemoryStream = New MemoryStream()
Dim contentAsBytes As Byte() = Encoding.UTF8.GetBytes(reportInHtml)
memoryStream.Write(contentAsBytes, 0, contentAsBytes.Length)
Dim contentType As ContentType = New ContentType()
contentType.MediaType = "application/ms-excel"
contentType.Name = "Excel_Report.xls"
I have a variable that the user sets to an excel file. Because the file can be of a different version of Excel, I'm testing the version first in a script task. Depending upon the version I then want to call a specific DataFlowTask and also want to set the
connection Manager accordingly for that DataFlow task.
i.e. if XLS extension then use the DataFlowTask with the Excel OLEDB Provider setting the connection to the variable passed.
if XLSX extension then use the DataFlowTask that uses the Office OLDEDB Provider with the Extension of Excel 12.0 again using the Variable passed as the connection setting.
An example on how to achieve this would be good.
I have a Shared Folder where Two .NET .Exes are placed.
My requirment is to call this two Exes using Script Task Component.
I am very bigginer in SSIS.
Please provide me Assistance to solve this issue.
if you need more information regarding problem, let me know.