Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving a spreadsheet using Automation
Message
 
À
04/11/2004 13:11:03
Tim Muller
Innovative Solutions, Inc.
West New York, New Jersey, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00958188
Message ID:
00958227
Vues:
17
Try referencing the workbook itself to see if it solves your problem
o = GETOBJECT(,'excel.application')
owb = o.ActiveWorkbook
owb.saveas(("c:\SamSludge.txt")
>My application will be called when Excel is up and a spreadsheet is visible. I need to save the spreadsheet as a text file. In testing my code I put the following in the command window (with the aid of Intellisense):
>
> myExcelApp = GetObject(, "Excel.Application")
> myExcelApp.ActiveWorkbook.SaveAs ("c:\SamSludge.txt")
>
>I get an error message from teh 2nd command saying that ActiveWorkbook does not evaluate to a object. Yet TYPE ("myExcelApp.ActiveWorkbook") returns "O". What did I do wrong?
>
>
>Tim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform