From: Greg Halsey Date: 2008-02-05T03:19:24+09:00 Subject: Re: Does anyone know how to open a excel file in read only? Darin Duphorn wrote: > > I've tried: > $Test_suite_workbook = excel.workbooks.open(FileName,ReadOnly:=True) > and > $Test_suite_workbook = excel.workbooks.openFileName),ReadOnly:=True > > Neither worked. > > Thanks try giving open() parameters as block... xlApp=WIN32OLE::new('Excel.Application') xlApp.Visible=1 xl_file = ('c:\\file.xls') xlApp.Workbooks.Open({'filename'=> xl_file, 'readOnly' => true}) -- Posted via http://www.ruby-forum.com/.