From: chen li Date: 2006-12-04T01:05:06+09:00 Subject: Re: How to get the values for Excel constants at once --- Martin DeMello wrote: > Use const_get - it's a method defined on Module. > > Excel_Const.constants.sort.each{|i| > puts "The value of Excel_Const::#{i} is > "+Excel_Const.const_get(i) > } Thank you very much. BTW it doesn't work when + is there so I change the code into the following: Excel_Const.constants.sort.each do|i| print "Excel_Const::#{i} is ","\t", Excel_Const.const_get(i) puts end Li ____________________________________________________________________________________ Any questions? Get answers on any topic at www.Answers.yahoo.com. Try it now.