Reputation: 546473
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?
Upvotes: 1
Views: 844
Reputation: 3948
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)"
Upvotes: 2