Hi Daz,
Sorry, I missed your post.=20
--- daz said:
I have tried the trick mentioned in that post but could not get it to wor=
k.
Here is the segment I tried:
#####################
require 'win32ole'
excel =3D WIN32OLE.new("excel.application",'localhost') # 'wsdev01')
excel['Visible'] =3D true
spreadsheet =3D excel.Workbooks.Open("C:\\junk.xls")
sheet =3D spreadsheet.Worksheets(1).Range("D1")
excel.Columns("A:A").select
excel.Sheets(1).Range("D1")
excel.Selection.Font.Name =3D "Arial"
excel.Selection.Font.FontStyle =3D "Normal"
excel.Selection.Font.Size =3D 14
excel.DisplayAlerts =3D false
excel.ActiveWorkbook.Save
excel.Workbooks.Close
excel.DisplayAlerts =3D 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 `ex=
cel.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
=20
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=20
http://mail.yahoo.com=20