Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Get Page Wise Totals in Excel
Message
De
29/07/1999 05:46:26
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
 
 
À
29/07/1999 04:22:14
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00247106
Message ID:
00247558
Vues:
40
>>>>Is it possible to get pagewise totals in Excel ??
>>>>
>>>>Any ideas/suggestions...
>>>>
>>>>TIA...
>>>Vinod,
>>>Take a look at subtotal method. Also there is sample code about it today title "....array...excel..".
>>>Cetin
>>
>>I found that thread, Thnks for the tip and code...
>>
>>Only one question... How we can select a particular page.. i.e. How we can come to know where page ends (i want to automate this thing from vfp...)
>>
>>Pls advs...
>Vinod,
>I hope this helps as a starter :
#include "xlConstants.h"
>USE home()+"samples\data\customer"
>Application.datatoclip("customer",reccount(),3)
>PUBLIC oExcel
>oExcel = createobject("Excel.application")
>Clear
>WITH oExcel
>  .WorkBooks.Add
>  WITH .ActiveSheet
>    .Range("D20").select
>    .Paste
>    lcLastCell = .Range("A1").SpecialCells(xlLastCell).Address(.f.,.f.,xlA1)
>    ? lcLastCell
>    .Range("A1").SpecialCells(xlLastCell).Select
>    .Application.Selection.Offset(1).Select
>  ENDWITH
>  .visible = .t.
>ENDWITH
Cetin

Thnks !! This code is really helpful, uses some very useful methods (which I was not aware), but it still returns the last cell...

Pls let me clear myself... If we take this same sample.. Data is pasted from customer.dbf into excel, and we have a column (last one) called maxordamt...I want total of this column on each page...

Now say if i Go in Page setup and make this sheet.. Fit to 1 Pages wide and 2 pages tall... so 2 pages will be printed...

What i want is Individual total on Each page... Suppose say user later on if user changes it to (Fit to 1 pages wide & 3 pages tall), then Total of individual page shud come on all 3 pages...

What exactly i want to know is How we can chk end of each page, so we can set total formula there....

Additionally you are using xlconstants.h file, What I have is "vfp_exce.h" file which I downloaded from John Harvest site.. Just want to reconfirm that both the files are same or not...

Pls advs your comments...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform