Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use a macro from excel 2000 to use it in foxpro.
Message
 
À
22/04/2002 09:55:25
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00647518
Message ID:
00647524
Vues:
22
I would recommend you to use external data rather than posting the data into excel (internal data) to create the pivot table. Take a look at my white paper on Pivot Tables at http://visionds.net/hcorrea/ to see how you can do this and why it is more convenient.

Edgar, las tablas dinamicas se llaman "pivot tables" en ingles. La verdad no se por que les cambiaron el nombre. A mi me gusta mas dinamicas que pivote pero en fin... :)


>Hello, i trying to create a dynamic table from foxpro 6.0 to excel 2000 this is the macro that it creates and that i need to modify to use it within foxpro:
>
> ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
>        "Hoja1!R1C1:R844C17").CreatePivotTable TableDestination:="", TableName:= _
>        "Tabla dinámica3"
>    ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1)
>    ActiveSheet.Cells(3, 1).Select
>    ActiveSheet.PivotTables("Tabla dinámica3").SmallGrid = False
>    ActiveSheet.PivotTables("Tabla dinámica3").AddFields RowFields:="Llamadas"
>    ActiveSheet.PivotTables("Tabla dinámica3").PivotFields("Llamadas").Orientation _
>        = xlDataField
>    Charts.Add
>    ActiveChart.SetSourceData Source:=Sheets("Hoja4").Range("A3")
>    ActiveChart.Location Where:=xlLocationAsNewSheet
>    Sheets("Hoja4").Select
>    Columns("A:A").Select
>    Selection.Insert Shift:=xlToRight
>    Rows("1:2").Select
>    Selection.Insert Shift:=xlDown
>    Range("B8").Select
>    ActiveSheet.PivotTables("Tabla dinámica3").PivotSelect "", xlDataAndLabel
>    ActiveSheet.PivotTables("Tabla dinámica3").Format xlReport2
>    Range("C5").Select
>    ActiveSheet.PivotTables("Tabla dinámica3").PivotFields("Contar de Llamadas"). _
>        Caption = "Total"
>    Range("B2:D3").Select
>-------------------------------------------------------
>And this part, where i use the "Hoja1!R1C1:R844C17" to specify the sourcedata, how can i modify this, because it can change dependig of the quantity of data that i have.
>
>Thanks for the help
Hector Correa
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform