1. Cornelis Lijzenga
  2. PowerBuilder
  3. Monday, 16 December 2019 14:45 PM UTC

Hi,

I have the following code lines. 

 

iole_OLE = CREATE OleObject

result = iole_OLE.ConnectToObject(filename,"excel.chart")

 

it has been working correctly but since a few days the ConnectToObhect returns a -2, Class name not found.

 

The application was developed in PB11.5 and earlier, and now is developed in PB2017.

 

Thanks in advance,

 

Cees

 

 

Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 17 December 2019 13:51 PM UTC
  2. PowerBuilder
  3. # 1

Is Excel installed on the server with the same bitness as the PowerBuilder app? The PowerBuilder Runtime Packager only does the PB runtime dlls, it doesn't install or register Excel Charts.

Comment
There are no comments made yet.
Cornelis Lijzenga Accepted Answer Pending Moderation
  1. Tuesday, 17 December 2019 12:40 PM UTC
  2. PowerBuilder
  3. # 2

Hello Michael,

Thank you for the reply. It appears that the class name(s) for the Excel classes do not appear in HKEY_CLASSES_ROOT on  the development server. 

Could it be that I do not have the correct rights to register the DLL's? 

I use the Powerbuilder Runtime Packager to create the PBCLTRT170.MSI which I executed on te server. Is there some loggging that could reveal if something went wrong?

Thanks in advance!

Cees

 

Comment
  1. Michael Kramer
  2. Tuesday, 17 December 2019 14:29 PM UTC
See Roland's reply. No Excel.Charts nor other Excel.xxx "classes" indicates no Excel installation registered.
  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Monday, 16 December 2019 15:41 PM UTC
  2. PowerBuilder
  3. # 3

Hi Cornelis,

Can you check whether class = "Excel.Chart" works any better than "excel.chart"?

OLEAutomation looks up the class name in Windows registry. So you should be able to find the class in registry (EX: Using RegEdit.exe) under Computer\HKEY_CLASSES_ROOT\...your-class-name...

HTH /Michael

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.