From: Shashank Date Date: 2005-07-09T01:08:15+09:00 Subject: Re: Win32OLE and remote servers? Hi Daz, Sorry, I missed your post. --- daz wrote: > > "Hello! Can you help me?" > http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/36595?36502-38858+split-mode-vertical > I have tried the trick mentioned in that post but could not get it to work. Here is the segment I tried: ##################### require 'win32ole' excel = WIN32OLE.new("excel.application",'localhost') # 'wsdev01') excel['Visible'] = true spreadsheet = excel.Workbooks.Open("C:\\junk.xls") sheet = spreadsheet.Worksheets(1).Range("D1") excel.Columns("A:A").select excel.Sheets(1).Range("D1") excel.Selection.Font.Name = "Arial" excel.Selection.Font.FontStyle = "Normal" excel.Selection.Font.Size = 14 excel.DisplayAlerts = false excel.ActiveWorkbook.Save excel.Workbooks.Close excel.DisplayAlerts = true ############################################# When I ran it with 'localhost' it ran fine. But when I changed it to 'wsdev01' which is a machine on the network which my machine can see and has Excel installed on it, the script error'd out saying: C:/atest/tst_excel.rb:6:in `initialize': Failed to create DCOM server `excel.application' in `wsdev01' (WIN32OLERuntimeError) HRESULT error code:0x80070005 Access is denied. from C:/atest/tst_excel.rb:6:in `new' from C:/atest/tst_excel.rb:6 Any hints as to what I could be doing wrong? Thanks, -- shanko __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com