Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel auto
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
01141348
Message ID:
01141383
Vues:
19
>Boris. Yes, kept the op and route. I've sent you an email as requested.
>
>>Terry can you post the code you use for Automation? Did you keep Operator and route code in Excel Sheet? I ask you becuase Excel has wonderful function called Subtotal.
>
>Terry
>>

Terry, Run this and tell me is this enough?
#define xlLastCell 11
#define xlSum -4157
LOCAL oExcel AS Excel.Application
oExcel = CREATEOBJECT([Excel.Application])
oExcel.Visible = .t.
oExcel.Workbooks.Open([d:\terry\S28-07-2006.XLS]) && Change with actual path
oExcel.Range([A1],oExcel.ActiveCell.SpecialCells(xlLastCell)).Select()

DECLARE oTotalFields[7]
oTotalFields[1] = 8
oTotalFields[2] = 9
oTotalFields[3] = 10
oTotalFields[4] = 11
oTotalFields[5] = 12
oTotalFields[6] = 13
oTotalFields[7] = 14
WITH oExcel.Selection 
     .Subtotal(1, xlSum, @oTotalFields, .t., .f., .t.)
     .Subtotal(2, xlSum, @oTotalFields, .f., .f., .t.)
ENDWITH
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform