Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Excel and VFP
Message
De
10/04/2003 06:31:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
09/04/2003 18:03:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00775795
Message ID:
00775928
Vues:
10
This message has been marked as the solution to the initial question of the thread.
>
>ActiveSheet.PivotTables("PivotTable").PivotFields("title").Subtotals = Array( _
>        False, False, False, False, False, False, False, False, False, False, False, False)
>
>
>I get ole error if i specify oPivotTables.pivotFields("title").subtotals = .f.
>
>How to get the equivalent of Array(False, False, False, False, False, False, False, False, False, False, False, False) in VFP
>
>
>2. I have a pivot field title in orientation =3 && page field, how can i specify the value of the title to be say 'Programmer'
>
>I created a macro and tried it but it also fires a error,here the code
>
>use detail
>titl=detail.title
>oPivotTable.PivotFields("Title").CurrentPage=titl
>
>
>TIA

1) Use nIndex parameter of Subtotals. If you set subtotals(1) to .t. (Automatic) first array element is set to .T. and rest is set to .F. First do that to set rest to .F. then set first to .F. ie:
with ox.ActiveWorkBook.ActiveSheet.PivotTables("PivotTable")
 .PivotFields("title").Subtotals(1) = .T.
 .PivotFields("title").Subtotals(1) = .F.
endwith
2) Your detail.line might have trailing spaces. Trailing spaces are removed from pivotitems and Excel is not smart as VFP on a nonexact match.
use detail
titl=trim(detail.title)
oPivotTable.PivotFields("Title").CurrentPage=titl
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform