June 13, 2011 at 3:48 pm
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
June 19, 2011 at 1:46 pm
You may want to try the last post on the following thread:
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy