Copy here full error.

2012/9/10 Sybren Kooistra <[email protected]>

> I get the error 'block in irb_binding' 'in 'each'' ?
>
> code =
>
> require 'Nokogiri'
> require 'Spreadsheet'
> Spreadsheet.client_encoding = "UTF-8"
> book = Speadsheet::Workbook.new
> sheet1 = book.create_worksheet
> row = 0
> Dir.chdir("anattempt")
> Dir.glob('*.html').each do |document| #apparently something goes wrong
> here
> f = file.open(document)
> searchablefile = Nokogiri::HTML(f)
>
> variabelekoloma = searchablefle.xpath("//h1")
> sheet1[row,0] = variabelekoloma.content
> row += 1
> end
> book.write 'htmltoexcel.xls'
>
> # Plus, how could i save boolean? (for example:  if xpath has
> content/returns text, then 'yes').
>
> --
> Posted via http://www.ruby-forum.com/.
>
>

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to