Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Pivot Table Wizard
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00836785
Message ID:
00836874
Vues:
14
I finally got it to work...

There it is :
#DEFINE xlDialogPivotTableWizard 312
#DEFINE xlExternal  2

DIME gaSelect[1]
gaSelect[1] = ""
lcODBCConnexion = "ODBC;DRIVER=SQL Server;SERVER= YourSQLServerName;UID=YourLogin;PWD=YourPassword;APP=Microsoft Visual FoxPro;DATABASE=DBName"

oXL = CREATEOBJECT("Excel.Application")
oWB = oXL.Workbooks.add()
oSheet = oWB.ActiveSheet
oXL.visible = .T.
oDialog = oxl.Dialogs(xlDialogPivotTableWizard)

oDialog.Show(xlExternal, @gaSelect,,,,,,,,,,,,, .T., lcODBCConnexion)
for External DataSource, the 1st, 2nd, and last parameters are mandatory.

Have a nice day,

Yanick
>FYI,
>
>Show does accept params... at least for some dialogs!
>
>
>#DEFINE xlDialogSaveAs  5
>oxl.Dialogs(xlDialogSaveAs).Show("FileName2Save")
>
>
>>AFAIK, show method does not accept parameters.
>>
>>>Yuri,
>>>
>>>I'am already doing that, put for flexibility purposes I want to give my user the ability to Create/Define new Pivot that gets saved and that they can call afterwards with a simple click. I need both ways...
>>>
>>>Thanks anyway for your help.
>>>
>>>Still I need to pass params to the Show Method.
>>>
>>>
>>>>Then you can create a pivot table with predefined properties, activate it and call the dialog from there. The very same way as it is allowed to do in Excel itself.
>>>>
>>>>>Actually I need to have the Dialog to let user interact with it...
>>>>>
>>>>>Anyone else?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform