Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'win32ole'
- conn = WIN32OLE.new("Excel.Application")
- def inspect_method(ole_method)
- puts "*" * 20
- puts "ole method: " + ole_method.name
- puts ole_method.invoke_kind + " returns " + ole_method.return_type_detail.join(", ")
- args = "takes #{ole_method.size_params} args"
- if ole_method.size_opt_params > 0
- args << " of which #{ole_method.size_opt_params} are optional"
- end
- puts args
- puts "named parameters: " + ole_method.params.inspect unless ole_method.params.empty?
- puts "not visible!" if !ole_method.visible?
- end
- methods = conn.ole_methods
- methods = methods.sort {|a, b| a.name <=> b.name }
- methods.map {|m| inspect_method(m)}
- # Uncomment this to see what else is out there!
- # puts (methods.last.methods - Object.new.methods).sort
Add Comment
Please, Sign In to add comment