Class: WIN32OLE_VARIABLE
- Inherits:
-
Object
- Object
- WIN32OLE_VARIABLE
- Defined in:
- win32ole.c,
win32ole.c
Overview
WIN32OLE_VARIABLE
objects represent OLE variable information.
Instance Method Summary collapse
-
#name ⇒ Object
(also: #to_s)
Returns the name of variable.
-
#ole_type ⇒ Object
Returns OLE type string.
-
#ole_type_detail ⇒ Object
Returns detail information of type.
-
#value ⇒ Object
Returns value if value is exists.
-
#variable_kind ⇒ Object
Returns variable kind string.
-
#varkind ⇒ Object
Returns the number which represents variable kind.
-
#visible? ⇒ Boolean
Returns true if the variable is public.
Instance Method Details
#name ⇒ Object Also known as: to_s
Returns the name of variable.
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
puts "#{variable.name}"
end
The result of above script is following:
xlChart
xlDialogSheet
xlExcel4IntlMacroSheet
xlExcel4MacroSheet
xlWorksheet
4082 4083 4084 |
# File 'win32ole.c', line 4082 static VALUE folevariable_name(self) VALUE self; |
#ole_type ⇒ Object
Returns OLE type string.
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
puts "#{variable.ole_type} #{variable.name}"
end
The result of above script is following:
INT xlChart
INT xlDialogSheet
INT xlExcel4IntlMacroSheet
INT xlExcel4MacroSheet
INT xlWorksheet
4125 4126 4127 |
# File 'win32ole.c', line 4125 static VALUE folevariable_ole_type(self) VALUE self; |
#ole_type_detail ⇒ Object
Returns detail information of type. The information is array of type.
tobj = WIN32OLE_TYPE.new('DirectX 7 for Visual Basic Type Library', 'D3DCLIPSTATUS')
variable = tobj.variables.find {|variable| variable.name == 'lFlags'}
tdetail = variable.ole_type_detail
p tdetail # => ["USERDEFINED", "CONST_D3DCLIPSTATUSFLAGS"]
4162 4163 4164 |
# File 'win32ole.c', line 4162 static VALUE folevariable_ole_type_detail(self) VALUE self; |
#value ⇒ Object
Returns value if value is exists. If the value does not exist, this method returns nil.
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
puts "#{variable.name} = #{variable.value}"
end
The result of above script is following:
xlChart = -4109
xlDialogSheet = -4116
xlExcel4IntlMacroSheet = 4
xlExcel4MacroSheet = 3
xlWorksheet = -4167
4209 4210 4211 |
# File 'win32ole.c', line 4209 static VALUE folevariable_value(self) VALUE self; |
#variable_kind ⇒ Object
Returns variable kind string.
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
puts "#{variable.name} #{variable.variable_kind}"
end
The result of above script is following:
xlChart CONSTANT
xlDialogSheet CONSTANT
xlExcel4IntlMacroSheet CONSTANT
xlExcel4MacroSheet CONSTANT
xlWorksheet CONSTANT
4317 4318 4319 |
# File 'win32ole.c', line 4317 static VALUE folevariable_variable_kind(self) VALUE self; |
#varkind ⇒ Object
Returns the number which represents variable kind.
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
puts "#{variable.name} #{variable.varkind}"
end
The result of above script is following:
xlChart 2
xlDialogSheet 2
xlExcel4IntlMacroSheet 2
xlExcel4MacroSheet 2
xlWorksheet 2
4360 4361 4362 |
# File 'win32ole.c', line 4360 static VALUE folevariable_varkind(self) VALUE self; |
#visible? ⇒ Boolean
Returns true if the variable is public.
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
puts "#{variable.name} #{variable.visible?}"
end
The result of above script is following:
xlChart true
xlDialogSheet true
xlExcel4IntlMacroSheet true
xlExcel4MacroSheet true
xlWorksheet true
4258 4259 4260 |
# File 'win32ole.c', line 4258 static VALUE folevariable_visible(self) VALUE self; |