Ganesh Ganesh wrote:
>   How to count the number of columns in an excel file....
> and i am using "Spreadsheet::ParseExcel" gem to parse the excel file

the ParseExcel-Gem is deprecated - please use its shiny new replacement:
gem install spreadsheet

and use Worksheet#dimensions:
http://spreadsheet.rubyforge.org/classes/Spreadsheet/Worksheet.html#M000197

hth

cheers
Hannes
-- 
Posted via http://www.ruby-forum.com/.