http://www.perlmonks.org?node_id=582792


in reply to Create a excel sheet with formula ???

If I understood your question correctly, I am answering your second question.

In case of formula the row and column not taking the variable


Change your formula code as shown below. Here the variables working perfectly in the formula.
my $first = 'C2'; my $second = 'C9'; for my $r (3..4) { $worksheet->write("E$r", "=COUNTIF($first:$second, \"pass\")"); $r++; $worksheet->write("E$r", "=COUNTIF($first:$second, \"FAIL\")"); + }
Also try to use strict and warnings.

Prasad