March 8, 2013 at 5:51 am
Ok so I am further on with it now I have clicked build.
I have added some more script around the code I already had
' Microsoft SQL Server Integration Services Script Task
' Write scripts using Microsoft Visual Basic
' The ScriptMain class is the entry point of the Script Task within Integration Services
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Public Class ScriptMain
' The execution engine calls this method when the task executes.
' To access the object model, use the Dts object. Connections, variables, events,
' and logging features are available as static members of the Dts class.
' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
'
' To open Code and Text Editor Help, press F1.
' To open Object Browser, press Ctrl+Alt+J.
Sub FormatSpreadsheetPS_V3()
My VBA Script
End Sub
End Class
Now I have done this I have lots and lots of errors such as......
'DisplayAlerts' is not a member of 'Microsoft.SqlServer.Dts.Runtime.Application'
Name 'Workbooks' is not declared.
Name 'curr' is not declared.
Name 'ActiveWorkbook' is not declared.
Name 'EXH' is not declared.
And so on and so on so obviously I need to do something else. The good thing is that at least its doing something now.
If any one has any best guesses what my next move should be it would be greatly apprieciated.
(I imagine I may get a comment that just says declare everything, I understand that but some more input on how you go about doing this would be good)
Debbie
March 8, 2013 at 8:58 am
Did you verify that Excel is installed on the machine you are trying to execute the SSIS package on?
March 8, 2013 at 9:39 am
Yes Im happy that Excel is on the machine and that the right version is being used.
I also went through this documentation
http://www.microsoft.com/en-us/download/confirmation.aspx?id=227
to ensure the correct Excel object is referenced.
oIf you are automating Microsoft Office Excel 2007, the type library appears as Microsoft Excel 12.0 Object Library in the References list.
oIf you are automating Microsoft Office Excel 2003, the type library appears as Microsoft Excel 11.0 Object Library in the References list.
oIf you are automating Microsoft Excel 2002, the type library appears as Microsoft Excel 10.0 Object Library in the References list
oIf you are automating Microsoft Excel 2000, the type library appears as Microsoft Excel 9.0 Object Library in the References list.
oIf you are automating Microsoft Excel 97, the type library appears as Microsoft Excel 8.0 Object Library in the References list
So Im happy with all that.
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply