Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing arrays to Excel variant properties
Message
From
18/03/2004 10:42:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
18/03/2004 09:36:37
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:
00887521
Views:
23
>Hi,
>can anybody help me. I am not able to pass array to Excel variant property:
>1. I can read Excel variant property and I get array sd
> sd=oXL.ActiveSheet.PivotTables(1).SourceData
>2. But I cannot set this property from VFP, even the property is read-write (I can set it from Excel VBA)
> oXL.ActiveSheet.PivotTables(1).SourceData=sd
>
>Thanks
> Norbert Kustra
...
		oDestination = .Range('A1')
		oDestination1 = .Range('O1')
		oDestination2 = .Range('A21')
		oDestination3 = .Range('O21')
...
		With oExcel.ActiveWorkbook.PivotCaches.Add(xlExternal)
			.Connection  = 'OLEDB;'+lcConnStr
			.CommandType = 2 && xlCmdSQL
			.CommandText = 'Select * from '+lcTableName
			.CreatePivotTable(oDestination1, 'PivotTable2')
			.CreatePivotTable(oDestination2, 'PivotTable3')
			.CreatePivotTable(oDestination3, 'PivotTable4')
		ENDWITH
...
		WITH .PivotTables("PivotTable1")
			.AddFields(@laRowFields, @laColFields, @laPageFields)
			.PivotFields('myField').Orientation = xlDataField
			.PivotFields('Count of myField').Caption = '# of Something'
		endwith
...
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