Running Excel .dll -
07-12-2006
, 07:13 PM
Hi Folks
I will be running my DTS program and calling Excel Macro functions and
performing Excel Cell Value checking on a server that does not have
Excel installed.
1. Is it possible to just install the Excel dll.
2. What is the name of the Excel dll I should install.
3. Which directory and location should I copy this Excel dll to.
4. Do I run my programs any differently?
5. Are there any other potential problems I should be aware of?
Here is a sample of my code:
Function Main()
'References to Excel
dim xl_app
dim xl_Spreadsheet
dim wkb
dim wks
Set xl_app = CreateObject("Excel.Application")
Set xl_spreadsheet =
xl_app.Workbooks.Open("\\archive\Daily\Report.xls" )
xl_app.DisplayAlerts = False
'Run the macro
If IsEmpty (
xl_app.Workbooks(1).Worksheets("Results").Range("A 2").value
) then
xl_app.Run("transform_macro")
End If
xl_spreadsheet.Save
xl_spreadsheet.Close
xl_app.DisplayAlerts = True
xl_app.Quit
set xl_app = Nothing
Main = DTSTaskExecResult_Success
End function
Please help! Thanks |