|Keep It Simple, Stupid|
Re^4: Get Cell Value while Reading Excel file and not the formulaby hdb (Prior)
|on Apr 14, 2013 at 08:50 UTC||Need Help??|
What I think is happening is the following:
Your "write" program generates an Excel file containing some formulae.
These formulae never get calculated unless you open the file in Excel and calculate.
If I then use your "read" program to read the file, I get "0.00%" values from the formula cells.
If I first save the spreadsheet in Excel, then the "read" program returns proper values.
My interpretation is that by using Spreadsheet::WriteExcel, formulae will never be calculated, which makes sense as no Excel is present necessarily. Your dilemma now is that you will not have the results from these formulae before you open the spreadsheet in Excel and have it calculated and saved. In which case using "Win32::OLE" would be the better solution. Then Perl would always interact with the spreadsheet through Excel and you can read/write as you like.
I have looked at the module documentation but I found nothing that confirms or contradicts my hypothesis.
Just for completeness, here is my reduced "write" script:
and my "read" script: