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?
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?
class Excel
attr_accessor :excel
def initialize
require ‘win32ole’ @excel = WIN32OLE::new(‘Excel.Application’)
WIN32OLE.const_load(@excel, ExcelConst) @excel.DisplayAlerts = false
yield self @excel.Quit
end
def open_book file
book =
self.excel.Workbooks.Open(file,UpdateLinks=ExcelConst::XlUpdateLinksNever)
yield book
self.excel.ActiveWorkbook.Close(0)
end
end