D
dkmd_nielsen
I'm not able to figure out the implementation of Excel's Range Replace
function through Ruby/win32ole. I thought the snippent at the end
would be correct correct, but I keep getting Ole errors. Obviously,
I'm doing a poor job at interpretting the available information out
there (Dave Thomas, wiki.RubyGarden, etc.) I'm just not getting it.
While I would appreciate the solution to my problem, I would really
appreciate an explanation of when and how to use pointers-to-objects
when working with win32ole.
Much appreciated.
dvn
require 'win32ole'
class ExcelConst
end
wb = WIN32OLE.connect("excel.application")
WIN32OLE.const_load(wb, ExcelConst)
ws = wb.ActiveSheet
ws.Range("C
").Replace('What'=>'nail',
'Replacement'=>'hammer',
'LookAt'=>ExcelConst::xlPart,
'SearchOrder'=>ExcelConst::xlByRows,
'MatchCase'=>ExcelConst::False,
'SearchFormat'=>ExcelConst::False,
'ReplaceFormat'=>ExcelConst::False
)
function through Ruby/win32ole. I thought the snippent at the end
would be correct correct, but I keep getting Ole errors. Obviously,
I'm doing a poor job at interpretting the available information out
there (Dave Thomas, wiki.RubyGarden, etc.) I'm just not getting it.
While I would appreciate the solution to my problem, I would really
appreciate an explanation of when and how to use pointers-to-objects
when working with win32ole.
Much appreciated.
dvn
require 'win32ole'
class ExcelConst
end
wb = WIN32OLE.connect("excel.application")
WIN32OLE.const_load(wb, ExcelConst)
ws = wb.ActiveSheet
ws.Range("C
'Replacement'=>'hammer',
'LookAt'=>ExcelConst::xlPart,
'SearchOrder'=>ExcelConst::xlByRows,
'MatchCase'=>ExcelConst::False,
'SearchFormat'=>ExcelConst::False,
'ReplaceFormat'=>ExcelConst::False
)