Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
mutiple tests | Excel Discussion (Misc queries) | |||
Running mutiple excel sheets on mutiple computers | Excel Discussion (Misc queries) | |||
mutiple if formulas | Excel Worksheet Functions | |||
Creating a PivotTable w/o selecting data in an existing PivotTable | Excel Discussion (Misc queries) | |||
PivotTable - PivotTable Field name is not valid - error! | Excel Programming |