Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel to recognize FoxPro memo fields?
Message
De
19/07/2000 12:12:24
Jonathan Cochran
Alion Science and Technology
Maryland, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00393509
Message ID:
00394385
Vues:
12
Just do an oExcel.SaveAs("C:\Book3.xls"). Named parameters aren't allowed when doing Automation from FoxPro. The other parameters it put in the macro code appear to be default values, so you shouldn't have pass them. If you need to pass them, then you'll need to find the parameter order and pass them as you would to a function/method call.

>thanks for the info and code. works well. but now i want to save the workbook as a specific name in a specific folder. went into excel, recorded a macro and then look at the VB code. i added the oExcel. before the ActiveWorkbook.Saveas. but i get a syntax error when i execute it in the command window.
>
>oExcel = CREATEOBJECT('Excel.Application')
>oExcel.workbooks.add
>oExcel.ActiveWorkbook.SaveAs FileName:="C:\Book3.xls", FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False
>
>thanks
>
>brenda
>
>>LOCAL oExcel, lnlast, lcalias, lvalue, lnrow
>>oExcel = CREATEOBJECT('Excel.Application')
>>* Create a new work sheet
>>oExcel.Workbooks.Add
>>lcalias = ALIAS()
>>lnlast = FCOUNT()
>>lnrow = 0
>>SCAN
>> lnrow = lnrow + 1
>> FOR lni = 1 TO lnlast
>> lccell = CHR(64 + lni) + TRANSFORM(lnrow)
>> oExcel.Range(lccell).Select
>> lvalue = lcalias + "." + FIELD(lni)
>> oExcel.ActiveCell.Value = &lvalue
>> NEXT
>>ENDSCAN
>>Of course, if you have more than 26 fields, you'll have to make an adjustment >in the column name.
>
>>>What do you mean by "Automation"? and what is AFAIK?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform