I have a document with tables in it. I want to convert the each cell
present in the table to image.
Any suggestions…
I have a document with tables in it. I want to convert the each cell
present in the table to image.
Any suggestions…
On 11 October 2012 10:57, kiran cy [email protected] wrote:
I have a document with tables in it. I want to convert the each cell
present in the table to image.
I, for one, have little idea exactly what you mean by this. What sort
of document? What do you mean by convert each cell to an image?
Which part of the problem do you not know how to do (read the
document, find the table, find the cell, generate the image, something
else)?
What has this got to do with Ruby on Rails?
Colin
Colin L. wrote in post #1079401:
On 11 October 2012 10:57, kiran cy [email protected] wrote:
I have a document with tables in it. I want to convert the each cell
present in the table to image.I, for one, have little idea exactly what you mean by this. What sort
of document? What do you mean by convert each cell to an image?
Which part of the problem do you not know how to do (read the
document, find the table, find the cell, generate the image, something
else)?What has this got to do with Ruby on Rails?
Colin
I just have to upload the ms-word document file and click the upload
button which should give me the images of the each cell in the table.
how to find the cell and convert to image?
Colin L. wrote in post #1079405:
On 11 October 2012 11:08, kiran cy [email protected] wrote:
What has this got to do with Ruby on Rails?
Colin
I just have to upload the ms-word document file and click the upload
button which should give me the images of the each cell in the table.how to find the cell and convert to image?
I assume you know how to upload the file (google for rails upload file
if not)
Then your next problem is not how to find the cell but is how to read
the ms word doc in ruby. I don’t know, I suggest some googling for
that too. I think it will also depend on what type of ms word doc
file it is, .doc, docx etc.You still have not explained what you mean by convert the cell to an
image but I think the other problems are more critical.Colin
I have tables in ms-word document(of format doc).
I want to convert the data present in each cell either it may be text or
image to the image
How do you suggest I do it?
On 11 October 2012 11:24, kiran cy [email protected] wrote:
Colin
I have tables in ms-word document(of format doc).
I want to convert the data present in each cell either it may be text or
image to the image
How do you suggest I do it?
As I said the first problem will to find a way of reading the .doc
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
On 11 October 2012 11:08, kiran cy [email protected] wrote:
What has this got to do with Ruby on Rails?
Colin
I just have to upload the ms-word document file and click the upload
button which should give me the images of the each cell in the table.how to find the cell and convert to image?
I assume you know how to upload the file (google for rails upload file
if not)
Then your next problem is not how to find the cell but is how to read
the ms word doc in ruby. I don’t know, I suggest some googling for
that too. I think it will also depend on what type of ms word doc
file it is, .doc, docx etc.
You still have not explained what you mean by convert the cell to an
image but I think the other problems are more critical.
Colin
Colin
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 .docColin
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
Colin L. wrote in post #1079407:
On 11 October 2012 11:24, kiran cy [email protected] wrote:
Colin
I have tables in ms-word document(of format doc).
I want to convert the data present in each cell either it may be text or
image to the image
How do you suggest I do it?As I said the first problem will to find a way of reading the .doc
file in ruby, which I don’t know how to do. Did google help you with
this? Is suggest googling for
ruby read .docColin
I can read doc using the docx gem, my problem is identifying the cell
and converting it to image
On 11 October 2012 12:31, kiran cy [email protected] wrote:
@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
Colin L. 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 .docColin
I can read doc using the docx gem, my problem is identifying the cell
and converting it to imageWell 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
On 11 October 2012 12:46, kiran cy [email protected] wrote:
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 .docColin
Suggest something other than the googling for finding the table/cell in
the document
As I said I have no idea about that gem. I would start by looking at
the documentation for the gem.
Colin
Colin L. wrote in post #1079421:
On 11 October 2012 12:31, kiran cy [email protected] wrote:
@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
endI 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 .docColin
Suggest something other than the googling for finding the table/cell in
the document
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs