I am using the PERL module Spreadsheet::WriteExcel to create an excel workbook from scratch. I create a worksheet put some data in it. Format everything and I also add a few formulas near the bottom of the sheet after all the data is written to the worksheet.
When I open the workbook, everything looks fine except the formulas. They all display as #DIV/0. Which is supposed to mean I am trying to divide by zero in my formula and that is not the case. In fact, if I select the cell with the formula and click in the edit field, but do not make any changes and just press the enter key, the cell calculates a correct value and the #DIV/0 message disappears.
I looked at the documentation and made sure all the parts of the formula are compatible with the PERL module and they are. I use the following functions:
ROUND
SUMIF
COUNTIF
/
The formula looks like:
=ROUND((SUMIF(A6:A38,L40,M6:M38)/COUNTIF(A6:A38,L40)),1)
Michael Libeson
When I open the workbook, everything looks fine except the formulas. They all display as #DIV/0. Which is supposed to mean I am trying to divide by zero in my formula and that is not the case. In fact, if I select the cell with the formula and click in the edit field, but do not make any changes and just press the enter key, the cell calculates a correct value and the #DIV/0 message disappears.
I looked at the documentation and made sure all the parts of the formula are compatible with the PERL module and they are. I use the following functions:
ROUND
SUMIF
COUNTIF
/
The formula looks like:
=ROUND((SUMIF(A6:A38,L40,M6:M38)/COUNTIF(A6:A38,L40)),1)
Michael Libeson