Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing arrays to Excel variant properties
Message
From
18/03/2004 11:02:02
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
18/03/2004 10:52:09
Norbert Kustra
SunSoft plus spol. s r.o.
Dolny Kubin, Slovakia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00887487
Message ID:
00887526
Views:
14
>Hi Cetin,
>thank you very much for your advice... but I need update the PivotCache object with new SourceData. And sourcedata is unfortunately a property, not a method, where passing arrays from VFP works... If you couldfind a sloution for me I would be very thankful.
>
> Norbert

But AFAIK SourceData is readonly. However you might use PivotTableWizard with the array. ie (directly pasteing from an old code ):
    With .ActiveSheet
      Dimension arrSourceData[6]
      arrSourceData[1] = "SELECT myexcel3.pageno, myexcel3.order_id, myexcel3.cust_id, myexcel3.emp_id, "
      arrSourceData[2] = "myexcel3.to_name, myexcel3.to_address, myexcel3.to_city, myexcel3.to_region, "
      arrSourceData[3] = "myexcel3.postalcode, myexcel3.to_country, myexcel3.ship_count, myexcel3.ship_via,"
      arrSourceData[4] = "myexcel3.order_date, myexcel3.order_amt, myexcel3.order_dsc, myexcel3.order_net,"
      arrSourceData[5] = "myexcel3.require_by, myexcel3.shipped_on, myexcel3.freight"
      arrSourceData[6] = " FROM myexcel3 myexcel3 ORDER BY myexcel3.pageno"

      .PivotTableWizard(xlExternal, ;
        @arrSourceData, ;
        "R1C1:R3C1", ;
        "PivotTable1",,,,,,,.F.,,,,, ;
        "ODBC;Driver={Microsoft Visual FoxPro Driver};"+;
        "DSN=;UID=;PWD=;SourceDB=c:\ddrive\TEMP;SourceType=DBF;"+;
        "Exclusive=No;BackgroundFetch=No;Collate=Machine;")
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform