Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ole error code 0x80030020 Excel
Message
De
16/04/2008 11:27:34
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01311114
Message ID:
01311134
Vues:
70
I found the problem. There was another instance of excel open.

>What line of code geneartes the error?
>
>>I get the following error when trying to import worksheets into a table from exce: ole error code 0x80030020.
>>
>>My code is as follows:
>>
>>Local loExcel, lnSheets, i, lcName, laSheetNames[1]
>>
>>Clear All
>>
>>Use S:\VFPAPPS\DEBTSERV\DATA\BOND_REDEMPTIONS.DBF Exclusive
>>
>>loExcel = CreateObject("excel.application")
>>loExcel.Workbooks.Open("S:\VFPAPPS\DEBTSERV\DATA\PRF-first day of month.xls")
>>lnSheets = loExcel.ActiveWorkbook.Sheets.Count
>>
>>Dimension laSheetNames[lnSheets,1]
>>
>>For i = 1 to lnSheets
>> lcName = loExcel.ActiveWorkbook.Sheets[i].name
>> laSheetNames[i] = lcName
>>EndFor
>>
>>loExcel.Workbooks.Close()
>>loExcel.Quit()
>>Release loExcel
>>
>>For i = 1 to Alen(laSheetNames)
>> lcName = laSheetNames[i]
>> Append From "S:\VFPAPPS\DEBTSERV\DATA\PRF-first day of month.xls" type xl8 sheet lcName
>>EndFor
>>
>>What am I missing?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform