Colin Law wrote in post #1079413:
> On 11 October 2012 11:40, kiran cy <[email protected]> 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

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

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to