Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using OleServer
Message
De
11/06/1999 15:33:38
 
 
À
11/06/1999 13:51:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00228894
Message ID:
00228970
Vues:
11
>We are using OLEServer to create Excel Workbooks from VFP 6.0. We can create the workbook, add values, format it, and so on. But we cannot figure out how to use the SaveAs() function, because VFP does not support named arguments. Here is sample code:
>
>oWorkbook = createobject("Excel.Application")
>with oWookbook
> .WorkBooks.Add
> .Sheets("Sheet1").Name = "Count"
> .Cells(1,1).Value = 'Name'
> .Cells(1,2).Value = 'Product'
> .Cells(1,3).Value = 'Count'
> .SaveAs('C:\INV.XLS') && < OLE Error here
> .Close
>endwith=09
>release oWorkbook
>
>What are we doing wrong?
>
>Also, each time we run this program is starts up another Excel process. How do we terminate a process?
>
>Any help would be greatly appreciated.
>
>Michele Pace
>Areté Inc.
>arete@areteinc.com

To close Excel, use oExcel.Quit()
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform