OLE no ClassFactory registered

0

I am maintaing an ruby-application. The ruby installation is packaged into a ThinApp. The Ruby Code is located on a network-share. Now there is a Problem with OLE and excel.

This is a sample code that produces the error.

require 'win32ole'

puts 'Starting Test'
excel = WIN32OLE.new('excel.application')

Traslated error message:

test.rb:4:in initialize: failed to create WIN32OLE object from `excel.application' (WIN32OLERuntimeError)  
    HRESULT error code:0x800401fe  
      Applicaiton has been started, but there is no ClassFactory registered.  
        from Z:/ruby test/test.rb:4:in `new'  
        from Z:/ruby test/test.rb:4:in `<main>'  

If I try WIN32OLE.new('word.application') my code works without an error.
Also WIN32OLE.connect('excel.application') works if excel is already started.

Has someone an idea what is cause of this problem?

Thx for your help

ruby
windows
ole
win32ole
asked on Stack Overflow Dec 17, 2019 by Ace of Spade • edited Dec 18, 2019 by Ace of Spade

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0