#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 108
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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
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
Connection to Olap Cube Gianluca71 Excel Discussion (Misc queries) 0 September 19th 08 10:42 AM
Stacked Sum From an OLAP Cube DenizDuelec Charts and Charting in Excel 0 August 4th 08 11:08 AM
suppress warning and locate cube in a pivot table from olap cube Tewari Excel Discussion (Misc queries) 0 March 28th 07 06:54 AM
olap cube little bear Excel Discussion (Misc queries) 1 February 16th 06 03:55 AM
Olap cube engine Simon Excel Discussion (Misc queries) 0 March 15th 05 07:49 AM


All times are GMT +1. The time now is 05:38 AM.

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

About Us

"It's about Microsoft Excel"