PDA

View Full Version : Powerpivot and Delay



stanl
08-09-2012, 08:01 AM
This does not pertain specifically to VBA, but as an FYI:

I write a lot of scripts to automate Excel, but these are executed outside of Excel as macro code is not permitted in the .xls(x) files.

a typical script begins:

oXL = CreateObject("Excel.Application")
oXL.Visible = true

which now often fail with the Powerpivot and SQL DataMining add-ins.

adding

While ! oXL.ready
...a time delay
EndWhile

the problem is resolved.

xld
08-09-2012, 03:19 PM
Have you also tried OnTime?

stanl
08-09-2012, 05:43 PM
Have you also tried OnTime?

I was assuming that was an event and wanted to stay away from early event processing when working outside the file... Are you referring to using

Application.OnTime (or in my case oXL.Ontime)

Show me da' code:dunno

Zack Barresse
08-14-2012, 07:45 PM
What is failing exactly? I'm assuming this is a VBS file of sorts? And if so, why would a company/system/admin not allow macros in a workbook but allow a script file to run?? I would certainly think it would be the other way around.

stanl
08-15-2012, 02:46 AM
What is failing exactly? I'm assuming this is a VBS file of sorts?

What is failing: can receive an unknown COM error in previous scripts (compiled Winbatch or Powershell) that automate Excel. Occurs when Powerpivot and Data Mining add-ins are installed and active which takes Excel more time to fully load.

Again, not a Powerpivot issue but more a timing issue starting Excel and setting properties. Issue was resolved by use of the .ready property, so the post was more an FYI.

shrivallabha
08-27-2013, 07:46 AM
What is failing: can receive an unknown COM error in previous scripts (compiled Winbatch or Powershell) that automate Excel. Occurs when Powerpivot and Data Mining add-ins are installed and active which takes Excel more time to fully load.

Again, not a Powerpivot issue but more a timing issue starting Excel and setting properties. Issue was resolved by use of the .ready property, so the post was more an FYI.
In the new office there was this COM add-in which I didn't need but was installed as default. It would take Excel ages to start. Disabling improved start up time considerably.

What is failing exactly? I'm assuming this is a VBS file of sorts? And if so, why would a company/system/admin not allow macros in a workbook but allow a script file to run?? I would certainly think it would be the other way around.
It could be that the file is not at a trusted location [network drive] and macro security is "disable with notification".

Aflatoon
08-29-2013, 02:47 AM
I'm surprised this is an issue since automating Excel should load it without any of its startup files/add-ins loaded unless you specifically enable them.