Perl Excel OLE CELL not able to retrieve return correct cell value on

Pouyan

New member
custom formula funciton? Hi, I have a particular problem: I have these cells that use a custom formula to get a value and one cell that uses a predefined formula. All these cells output correct value in excel. But when I grab the value of the cells, only the one with predefined formula returns the correct text value; the rest return sth like:
Win32::OLE::Variant=SCALAR(0xe0dabc)

what am I doing wrong?
Here some more details:

A1: North America
B1: has value: Canada, USA, Mexico : =sheet1!concat2(A1:A4)
A2: Mid East
B2: has value: Egypt, Libya, Syria, Iran and formula : =sheet1!contact(A12,A13,A14,A15)

So B1 is using a custom made VBA formula called concat2 and B2 is using the normal concatenate formula.
I am using perl to output something like:

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

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

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

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