[EMAIL PROTECTED] wrote: > I am attempting to write a simple formula using > Spreadsheet:WriteExcel. > > Here is the line: > $colletter = 'B'; > my $formula = "=sum($colletter"."3:"."$colletter$rowcnt)"; > $ws1->write_formula($rowcnt,$colcnt,$formula,$workbook->add_fo > rmat(size => 10, > > bold => 0, > > italic => 0, > > underline=>0, > > text_wrap=>1, > > align=> 'center', > > -bg_color => 9, > > -border => 1)); > > Tthe error I get back is: > Couldn't parse formula: =sum(b3:b163) at program.pl line 669
My first guess would be that your column letters were expected to be upper case, which if true would mean that the code you provided was not real code, particularly the $colletter = 'B'; part. Also, I think that my $formula = "=sum(${colletter}3:$colletter$rowcnt)"; is easier to read. HTH -- Brian Raven ----------------------------------------------------------------------- The information contained in this e-mail is confidential and solely for the intended addressee(s). Unauthorised reproduction, disclosure, modification, and/or distribution of this email may be unlawful. If you have received this email in error, please notify the sender immediately and delete it from your system. The views expressed in this message do not necessarily reflect those of LIFFE Holdings Plc or any of its subsidiary companies. ----------------------------------------------------------------------- _______________________________________________ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs