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:
01141392
Vues:
16
Thanks Boris

This brought up an excel, totally blank, no cells, grey background. I dismissed it and VFP was hung till I pressed esc.

???

>>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
>
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform