Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Pivot Table Wizard
Message
From
09/10/2003 10:49:58
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00836785
Message ID:
00836874
Views:
16
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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform