I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2007-02-19 21:43:05-08 by zeycus
Formula is not refreshed in Excel (inside Perl)
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-&gt Workbooks-&gtOpen("r:/MIGUEL/valoracion/2006_01_25_Boiro/".$fileName); my $Sheet2 = $Book2-&gtWorksheets("Valor Boiro"); ...
I have tried to execute things like:
$Excel-&gt Calculate; $Sheet2-&gt Calculate; $Sheet2-&gt Cells(24, 2)-&gt Calculate;
to force the recalculation, but it seems to have no effect. What should I do??
Direct Responses: Write a response