|
Hi, I am new to Perl. I am trying to use the Win32::Ole module to
modify and create Excel files in Perl. Everything has worked smoothly
until I needed to copy the value in a specific cell from one
spreadsheet to another. The original cell contains a formula, and I
want to copy the value to the other spreadsheet. The problem is that
the 'Value' is not what it should be. After some experiments, it seems
that the cause of the problem is that that formula is using other
cells that are using a Visual Basic fuction in a module of mine (if
that cell contains just arithmetic, the value is calculated
well). When I open that spreadsheet with a double click, it takes a
fraction of second for those cells to be calculated. My hunch is that
the problem lies there, that when in the perl code I try to get the
value, that is hapenning before any calculation of the value using my
module takes place.
After opening the spreadsheet with
my $Book2 = $Excel-> Workbooks->Open("r:/MIGUEL/valoracion/2006_01_25_Boiro/".$fileName);
my $Sheet2 = $Book2->Worksheets("Valor Boiro");
...
I have tried to execute things like:
$Excel-> Calculate;
$Sheet2-> Calculate;
$Sheet2-> Cells(24, 2)-> Calculate;
to force the recalculation, but it seems to have no effect.
What should I do?? |