gongcw:

First of all, you might want to brush up on your terminology so you can write your questions more clearly. (Example: Win32::OLE doesn't parse spreadsheets, $sheet->Shapes et. al. aren't modules, ...)

Anyway, one way to handle this manually is to go to Excel, select the picture and copy it. Then switch over to Word, select a location for the picture, and then paste it. So I suggest reading Using Win32::OLE and Excel - Tips and Tricks and Automating Windows Apps with Win32::OLE. Then, open up your Excel document, and start the macro recorder, and copy the picture to the clipboard. Then view the macro and using your newly-won knowledge of Win32::OLE, you'll be able to get the picture to the clipboard. For the next step, start word, start the macro recorder, and paste a picture from the clipboard into your word document. Then use the clues in your macro to get the picture from the clipboard into your word document.

If you have any trouble, post the code you're having trouble with, and we'll try to help you out a bit further.

...roboticus


In reply to Re^3: How to get picture in MS excel and insert them into MS word file by the module win32::OLE? by roboticus
in thread How to get picture in MS excel and insert them into MS word file by the module win32::OLE? by gongcw

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.