in reply to Excel OLE cell value custome pre-defined predefined function formula error

Additional Details:

A5: has value: Canada, USA, Mexico, formula :=sheet1!concat2(A1:A4)

B5:has value: Egypt, Libya, Syria, Iran and formula : =sheet1!concatenate(A12,A13,A14,A15)

So A5 is using a custom made VBA formula called concat2 and B5 is using the normal concatenate formula. I am using Perl to output something like:

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

But only printing $values[2] is correct. printing  $values[1] gives a : Win32::OLE::Variant=SCALAR(0x102e444)

If change the formula of A5 to use a normal formula, it will display the correct value.

But I want to use a custom made formula so what is wrong?

Replies are listed 'Best First'.
Re^2: Excel OLE cell value custome pre-defined predefined function formula error
by Anonymous Monk on Feb 05, 2011 at 00:11 UTC

    sorry please replace the 3rd last sentence above with this:

    But only printing $values[3] is correct. printing $values[2] gives a : Win32::OLE::Variant=SCALAR(0x102e444)

      It might be better to edit the original post rather than keep adding supplementary replies to yourself.

        Anonymonks can't do this. It's one af the advantages of registering.

        Regards,

        John