On 11 October 2012 12:31, kiran cy <li...@ruby-forum.com> wrote: > Colin Law wrote in post #1079413: >> On 11 October 2012 11:40, kiran cy <li...@ruby-forum.com> wrote: >>>> file in ruby, which I don't know how to do. Did google help you with >>>> this? Is suggest googling for >>>> ruby read .doc >>>> >>>> Colin >>> >>> I can read doc using the docx gem, my problem is identifying the cell >>> and converting it to image >> >> Well if you had started this thread by asking how to use the docx gem >> to find a cell in a ms word document then you would have saved us both >> some time. I have not used the docx gem so have no idea. Does the >> documentation for the gem tell you how to parse the document? >> >> Colin > > Parser object source code: > > def initialize(path) > @zip = Zip::ZipFile.open(path) > @xml=Nokogiri::XML(@zip.find_entry('word/document.xml').get_input_stream) > > if block_given? > yield self > @zip.close > end > end
I don't understand why you have posted that code. I notice however that the docx gem says that it is for .docx files, not for .doc Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.