From: Siep Korteling Date: 2010-03-03T07:30:37+09:00 Subject: Re: win32ole excel "links to other workbooks" zak wrote: > Hi! > > I use win32ole to access excel-workbooks. > When ruby opens a workbook with links to other workbooks an alert box > pops up and you have to confirm whether you want to keep those links > or not. > This is very annoying in my application. > is there a way to surpress the box and choose "no" by default? > > Thanks! require 'win32ole' class ExcelConst # to be filled with all Excelconstants # once excel is running end xl = WIN32OLE.new('Excel.Application') WIN32OLE.const_load(xl, ExcelConst) # All Excel constans are now available. # NB they all start with an uppercase letter. wb = xl.workbooks.open("path\\file.xls",UpdateLinks=ExcelConst::XlUpdateLinksNever) # use XlUpdateLinksAlways for the opposite effect. # Do stuff xl.workbooks.close xl.quit hth, Siep -- Posted via http://www.ruby-forum.com/.