Thank you for your reply however I am getting the following error:

C:/Users/barry/Desktop/tester4.rb:16:in `block in <main>': can't convert
Array into String (TypeError)
  from C:/Users/barry/Desktop/tester4.rb:11:in `each'
  from C:/Users/barry/Desktop/tester4.rb:11:in `<main>'
[Finished in 2.3s with exit code 1]


require 'nokogiri'
require 'open-uri'
require 'spreadsheet'

my_excel_output = []

my_array =[
["http://www.asus.com/Notebooks_Ultrabooks/ASUS_TAICHI_21/#specifications",
'div#specifications div#spec-area ul.product-spec li'],
["http://www.asus.com/Notebooks_Ultrabooks/S56CA/ #specifications",
'div#specifications div#spec-area ul.product-spec li']
]
my_array.each do |my_url, my_css|

  doc = Nokogiri::HTML(open(my_url))
  lines = doc.css(my_css).map(&:text)

  'C:/Users/Barry/Desktop/output2.xls' << lines

end

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