vote up 1 vote down
star

I'm generating an excel spreadsheet using the PEAR extension, Spreadsheet_Excel_Writer. I need to add an array formula to one of the cells, but all the info I've read about them only discusses them as if you're in the Excel program itself: it says you have to type in the formula as normal and then press Ctrl+Shift+Enter to switch it to an array formula.

Is there a way I can do this programmatically?

flag
add comment

1 Answer

vote up 2 vote down

There is a property called FormulaArray that allows array formulas to be entered programmatically. Hopefully this is exposed to you from your PHP extension.

Usage:

Sheet1.Range("C1:C3").FormulaArray = "=(A1:A3)*(B1:B3)"
link|flag
thanks - i'll investigate this and let you know how it goes. – nickf Mar 27 at 6:37
add comment

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.