LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default pivottable mutiple recordsource

Dear Group,

I'm planning a extensive sheet with multiple recordsources. Consolidating
(pivottable-wizard) is no option. I found one solution with odbc. Something
like:

With ActiveWorkbook.PivotCaches.Add(SourceType:=xlExter nal)
.Connection =
Array("ODBC;DSN=Excel-bestanden;DBQ=C:\Testing.xls;DefaultDir=C:\;Driver Id=790;MaxBufferSize=2048;PageTimeout=5;")
.CommandType = xlCmdSql
.CommandText = Array("SELECT * FROM dbBlad1 UNION SELECT * FROM dbBlad2")
.CreatePivotTable TableDestination:="[Map2]Blad2!R3C1",
TableName:="Draaitabel3", DefaultVersion:=xlPivotTableVersion10
End With
ActiveSheet.PivotTables("Draaitabel3").AddFields RowFields:="GB",
ColumnFields:="Bron"
ActiveSheet.PivotTables("Draaitabel3").PivotFields ("Bedrag").Orientation =
xlDataField

My question: can't xl not be fooled with some union of ranges instead of
the odbc-solution.

--
best regards,

Leon
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mutiple tests Mikev Excel Discussion (Misc queries) 2 March 2nd 10 02:20 PM
Running mutiple excel sheets on mutiple computers Lost Excel Discussion (Misc queries) 3 January 16th 09 12:32 AM
mutiple if formulas JaneSmith Excel Worksheet Functions 1 June 18th 08 01:49 AM
Creating a PivotTable w/o selecting data in an existing PivotTable Damian Excel Discussion (Misc queries) 6 November 2nd 07 04:44 PM
PivotTable - PivotTable Field name is not valid - error! miker1999[_17_] Excel Programming 1 June 10th 04 10:30 AM


All times are GMT +1. The time now is 02:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"