Hi I am generating an Excel s/sht with above module and inserting formula to provide calculated results on the s/sht - code snippets below.
In the *types* case below the calculated results are displayed on opening the s/sht, but in the *branch* case the initial on opening results are not displayed (shows 0 (zero)). They do display after editing the cell (press F2 then Enter). What I want to have happen is for the *branch* results to also be displayed on initial opening. Does anyone have any ideas on what is happening and what I can try to get my desired result? NOTE: the *write_formula* method is just a change I made to try and get it working. [code] # types tallies $col = 18; # type column $cell1 = xl_rowcol_to_cell($ttop,$col); # column range start $cell2 = xl_rowcol_to_cell($tbottom,$col); # column range end $cnt = 0; for (@list) { $row = $ftop + $cnt; $formula = "=COUNTIF($cell1:$cell2,MID(". xl_rowcol_to_cell($row,$col + 1) .",2,1))"; $proj_sht->write($row,$col,$formula,$fmtNmbrCenter); $cnt++ } [\code] Produces cell formula like: =COUNTIF(S2:S136,MID(T139,2,1)) [code] # branch tallies $col = 3; # branch column $cell1 = xl_rowcol_to_cell($ttop,$col); # column range start $cell2 = xl_rowcol_to_cell($tbottom,$col); # column range end $cnt = 0; for (@branches) { $row = $ftop + $cnt; $formula = "=COUNTIF($cell1:$cell2,". xl_rowcol_to_cell($row,$col - 1) .")"; $proj_sht->write_formula($row,$col,$formula,$fmtNmbrCenter); $cnt++ } [\code] Produces cell formula like: =COUNTIF(D2:D136,C139) -- Regards John McMahon li...@jspect.fastmail.fm _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs