As davies pointed out, without your Excel file, others won't be able to test your script. However, I took a quick look into the OLE browser. You might want to try Value2 to see if that is returning what you want.

Based on your follow on post, it looks like cell A5 is the cell that has the special function. To try my suggestion, just change:

$values[2]  = $sheet -> Range("A5")->{Value};

to be:

$values[2]  = $sheet -> Range("A5")->{Value2};

Not claiming that this will "fix" the problem. Just tossing out an idea to try out.


In reply to Re: Excel OLE cell value custome pre-defined predefined function formula error by dasgar
in thread Excel OLE cell value custome pre-defined predefined function formula error by Anonymous Monk

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.