Open Cube Browser with VBA?

Post Reply
mitch23
Posts: 21
Joined: Thu Jan 29, 2009 11:32 am
OLAP Product: Planning Analytics
Version: 10.1
Excel Version: Office 365

Open Cube Browser with VBA?

Post by mitch23 »

Does anyone know if there is a way to open up a cube browser with VBA (and ideally with a specified layout and subsets present)?
lotsaram
MVP
Posts: 3672
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Open Cube Browser with VBA?

Post by lotsaram »

You could programatically insert an in spreadsheet browser view control and set the cubename and viewname properties but AFAIK programatically opening the Perspectives cube browser itself is not possible but it would be good to be wrong on this one as it would be a handy rabbit to pull out of the hat from time to time.
Wim Gielis
MVP
Posts: 3140
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Open Cube Browser with VBA?

Post by Wim Gielis »

Hi

It's possible, but not the safest code. You can use SendKeys in VBA. Adjust

Code: Select all

Sub Open_SE()

Application.Run "TM1StartOrionWithAutomation"

'wait for Server Explorer to open
Application.Wait Now + TimeValue("00:00:05")
'expand Applications
SendKeys "{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}"
'jump to cubes and expand
SendKeys "{C}{RIGHT}"
End Sub
Source: http://www.bihints.com/book/export/html/2

Wim
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Boas
Posts: 16
Joined: Mon Sep 07, 2020 12:54 pm
OLAP Product: Planning Analytics
Version: 2.0.8
Excel Version: MS 365

Re: Open Cube Browser with VBA?

Post by Boas »

Hi everyone,

since Wims respond is some time ago, I was wondering if there are new possibilities regarding the original question, especially in the PA world.

We would like to open a cube view in the cube viewer via VBA macro.

Sadly, Drill-processes seem not to be the solution:
https://tm1forum.com/viewtopic.php?p=36927#p36927
viewtopic.php?t=6076
Boas
Posts: 16
Joined: Mon Sep 07, 2020 12:54 pm
OLAP Product: Planning Analytics
Version: 2.0.8
Excel Version: MS 365

Re: Open Cube Browser with VBA?

Post by Boas »

Hi everyone,

there came something to my mind again: The Workspace User Interface API.

By this, you could at least show a saved cube view in the internet browser:
https://ibm.github.io/planninganalytics ... g-a-widget

Though, you have to handle all the authentification stuff and you leave the Excel environment. So I still welcome other solutions/approaches.

Best regards and thanks in advance!
Wim Gielis
MVP
Posts: 3140
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Open Cube Browser with VBA?

Post by Wim Gielis »

You could consider the PAfE API to create an Exploration with Excel VBA.
https://ibm.github.io/paxapi/#introduction
Last edited by Wim Gielis on Fri Jul 05, 2024 11:06 am, edited 1 time in total.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Boas
Posts: 16
Joined: Mon Sep 07, 2020 12:54 pm
OLAP Product: Planning Analytics
Version: 2.0.8
Excel Version: MS 365

Re: Open Cube Browser with VBA?

Post by Boas »

Hi Wim,

oh, great! That's a good hint! Thanks a lot! This should make it possible to accomplish what I have in mind.
Wim Gielis
MVP
Posts: 3140
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Open Cube Browser with VBA?

Post by Wim Gielis »

You're welcome, hope it works fine or you.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply