Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Get OLAP cube name
Hello,
I'm not very experienced with OLAP cubes, but have been asked to see if there's a way to get the name of the OLAP cube associated with a pivot table in a spreadsheet. It looks to me like it's easy in Excel 2007 to see the Workbook Connections, but I do not see a way in the earlier versions. Is that correct, or is there a way to get the cube name? Unfortunatley, we have users here on different Excel versions. Thanks! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Get OLAP cube name
The code below is the core that you are in need. There may be more properties of the DataColumn that you need to look at, but this should get you started. Code Snippet Dim svr As New Server svr.Connect(".\sql05") Dim db As Database db = svr.Databases.GetByName("Adventure Works DW") Dim dsv As DataSourceView = db.DataSourceViews.GetByName("Adventure Works Dw") Dim dimCust As Dimension = db.Dimensions.GetByName("Customer") Dim attCust As DimensionAttribute = dimCust.Attributes(0) Dim colBinding As ColumnBinding = CType(attCust.NameColumn.Source, ColumnBinding) Dim col As Data.DataColumn = dsv.Schema.Tables(colBinding.TableID).Columns(colB inding.ColumnID) Console.WriteLine(col.ExtendedProperties("Computed ColumnExpression")) Still if you can't get it I would also recommend a book on OLAP and believe me its pretty informative. The 'book is available on Amazon ' (http://tinyurl.com/yelxeyd) & you can buy an e-book directly from the publisher by writing . -- Michael Wong ------------------------------------------------------------------------ Michael Wong's Profile: http://www.thecodecage.com/forumz/me...hp?userid=1001 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=135386 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Connection to Olap Cube | Excel Discussion (Misc queries) | |||
Stacked Sum From an OLAP Cube | Charts and Charting in Excel | |||
suppress warning and locate cube in a pivot table from olap cube | Excel Discussion (Misc queries) | |||
olap cube | Excel Discussion (Misc queries) | |||
Olap cube engine | Excel Discussion (Misc queries) |