Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsI need to create an Excel file within a DTS task, but the task behaves somewhat odd.
I can create the file by this way:
**************************
Option Explicit
Function Main()
Dim oFSO
Dim catDB
Dim catTBL
Dim strFilename
strFilename = "C:\Test_27.07.2005.xls"
' FSO - Objekt erstellen
Set oFSO = CreateObject("Scripting.Fi
' Test, ob Datei bereits existiert. Gegebenenfalls löschen.
If oFSO.FileExists(strFilenam
oFSO.DeleteFile strFilename
End If
' FSO - Objekt aufräumen
Set oFSO = Nothing
Set catDB = CreateObject("ADOX.Catalog
catDB.Create "Provider=Microsoft.Jet.OL
Set catTBL = CreateObject("ADOX.Table")
With catTBL
.Name = "Test 123" ' Name des Excel - Arbeitsblattes
Set .ParentCatalog = catDB
End With
catDB.Tables.Append catTBL
Set catTBL = Nothing
Set catDB = Nothing
Main = DTSTaskExecResult_Success
End Function
**************************
After this, the file is there, but Excel can't deal with it.
Do I change the Properties string to:
catDB.Create "Provider=Microsoft.Jet.OL
I will receive the error "Operation not supported for this kind of object"
I have MDAC 2.8 installed and I know that it worked in former times.
Do I change the creation to:
catDB.ActiveConnection = "Provider=Microsoft.Jet.OL
then I am told "successfully executed", but theres no file there. I know for sure that this also worked in former times.
Any help appreciated.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: jltoopsPosted on 2005-09-14 at 06:47:03ID: 14880722
Comments are available to members only. Sign up or Log in to view these comments.