value()
public
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
Show source
/*
* call-seq:
* WIN32OLE_VARIABLE#value
*
* 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
*
*/
static VALUE
folevariable_value(self)
VALUE self;
{
struct olevariabledata *pvar;
Data_Get_Struct(self, struct olevariabledata, pvar);
return ole_variable_value(pvar->pTypeInfo, pvar->index);
}