I have been asked to create a dts package and need a little advice to get me started please.

A User uploads a workbook via an asp page, this asp page will then call a dts package to do the following;

unprotect the workbook (I know the password in advance)

read certain cells and compare them to values stored in a sql server table

move the file location or delete as a result of the above check.


Ive tried an activeX script in the dts to unprotect the workbook

VB Code:
  1. Function Main()
  2.  
  3. Dim ExFile
  4. ExFile= (path)
  5.    
  6. Dim xl
  7. xl = CreateObject("Excel.Application")
  8.    
  9. Dim myWorkbooks
  10. myWorkbooks = xl.Workbooks
  11. xl.Visible = False
  12. myWorkbooks.Open(ExFile)  
  13. myWorkboks.ACTIVEWorkbook.Unprotect(password)
  14.  
  15. End Function

but am getting error object required 'xl' at line 13 (myWorkbooks = xl.Workbooks)

any help would be apprectiated