Hello
All,
I have refreshing the pivot table using script task inside the SSIS package and it worked great. But in my new server they are not installing Office application and all that will be availiable is drivers. How do i get my pivot table refreshed using script? Script that i am using at the moment with office application.
Public Sub Main()
Dim objXLS_Application As Object
Dim objXLS_Workbook As Object
Dim s_outputfilename As String
objXLS_Application = CreateObject("Excel.Application")
s_outputfilename= "\\C:\Test.xlsm"
objXLS_Workbook = objXLS_Application.Workbooks.Open(s_outputfilename)
Call objXLS_Application.Run("'" & s_outputfilename & "'" & "!MacroRefreshAll")
Call objXLS_Workbook.Save()
Call objXLS_Workbook.close()
objXLS_Workbook = Nothing
Call objXLS_Application.Quit()
objXLS_Application = Nothing
Dts.TaskResult = ScriptResults.Success
End Sub