Herewith I have user the Spreadsheet gem for accessing the excel sheet using ruby language.
To print the entire lines in excel file the below script executes well.
==========================
Install the gem: gem install spreadsheet
require "rubygems"
require 'spreadsheet'
book= Spreadsheet.open('myexcel.xls')
book.worksheets
sheet1 = book.worksheet 0
sheet1.each do |row|
puts row
end
=======================
To print the entire lines in excel file the below script executes well.
==========================
Install the gem: gem install spreadsheet
require "rubygems"
require 'spreadsheet'
book= Spreadsheet.open('myexcel.xls')
book.worksheets
sheet1 = book.worksheet 0
sheet1.each do |row|
puts row
end
=======================
No comments:
Post a Comment