IBM / paxapi

This repository hosts the API documentation for IBM Planning Analytics for Microsoft Excel. For full product documentation, please visit the Knowledge Center:
https://www.ibm.com/support/knowledgecenter/SSD29G_2.0.0/kc_gen/com.ibm.swg.ba.cognos.ipa.doc_using_planning_analytics_toc-gen2.html
Apache License 2.0
6 stars 5 forks source link

Macro code for Refresh sheet doesn't work since December update #51

Closed FilipSuster closed 1 year ago

FilipSuster commented 1 year ago

Dear support, I have been using macros in my Excel files to trigger some functionalities, like RefreshSheet. Since the new update, when I try to run my macro, I get an error and the following line is highlighted as the problematic line:

Application.COMAddIns("CognosOffice12.Connect").Object.AutomationServer.Application("COR", "1.1").RefreshSheet

I'm not sure how to solve it, I didn't find any solution yet. What could be the issue? Is this line now working anymore because of the new update? Thank you.

tedphillips commented 1 year ago

apologies for the delay in response.

so, nothing immediately looks wrong with that line, can you say more about the failure mode/message?

my suggestion would be to break that line up into parts, and that may help reveal exactly which step is going wrong.

can you comment on what version you were running and what you upgraded to?

also, is Cognos for Microsoft Office also installed?

FilipSuster commented 1 year ago

Hello @tedphillips, thank you for your reply. My version is 2.0.82.5. I tried to split the code into lines using " _", but all the lines went yellow at once when I was testing it. For some reason I cannot upload any images here. In my project file, the CognosOfficeAutomationExample is imported to Modules and CognosOfficeMessageSuppressor is imported to Class Modules. I did no change here, it just stopped working after updating to version IBM PA add-in 2.0.82.5. So in your opinion, nothing significant was changed with version 2.0.82.5 that would have an impact on that refresh command?

tedphillips commented 1 year ago

expect that nothing changed there, but i'll go back the team and ask for additional review.

by splitting up the lines i mean setting a var to each incremental object

in psuedocode:

var com = Application.COMAddIns("CognosOffice12.Connect") var as = com.Object.AutomationServer var reporting = as.Application("COR", "1.1") reporting.RefreshSheet()

could break it up a bit further than that, but maybe it gives you the idea

tedphillips commented 1 year ago

going by your other issue item, it sounds like Cognos for Microsoft Office was co-installed, though i'm not clear why your status would've changed circa 85? it'd be helpful to me if you could confirm and we could close out this item, but i'll do another check from my end to make sure the progID logical is still intact.

FilipSuster commented 1 year ago

Hi @tedphillips I copy pasted the code as you suggested for the test, but the code had an logical error so it didn't run it and couldn't figure out what was wrong. I thought reinstalling the add-in would help, but it didn't. My current version of IBM PA for Excel is 2.0.82.5 if that helps. However I think it didn't work for me for the reason I stated in my new thread, therefore I think we can close this item.