How to write & apply formula which will set cell value for all rows

Posted by: chayankar209 on 18 April 2018, 8:01 am EST

    • Post Options:
    • Link

    Posted 18 April 2018, 8:01 am EST

    I have to calculate and set cell value for all the rows in a flexSheet. The user will provide formula. I am curious about the nature of syntax as well.

    To elaborate, lets say I have 4 rows and 3 columns (A,B,C). I have to set value for new column, D, for all the rows. Value will be the result of summation of cell values of A,B,C

    (D1= A1+B1+C1, D2= A2+B2+C2…)

    Thanks !!

  • Posted 19 April 2018, 6:01 am EST

    Hi,

    You may add the formula for each cell on button click by setting formula or write formula for once cell and copy to other cells same as excel.

    Please refer to the following fiddle that implies button click method:

    http://jsfiddle.net/627xcqLd/5/

    ~Manish

  • Posted 25 April 2018, 2:44 am EST

    Copying the formula across all the cells is not working in flexsheet ! I am unable to do that ! Can you confirm this ? Button click method can be implemented, but then we have to capture the formula entered by user at runtime and do the calculation.

  • Posted 26 April 2018, 9:21 am EST

    Hi,

    FlexSheet provides Excel like formula copy but you should include grid.xlsx module attached in your project for that.

    To check the functionality,

    
    * "Now select cell A2 and press Ctrl+C to copy"
    
    * "Then select a cell in column A or a range of cells in Column A"
    
    * "Press Ctrl+V to paste"
    "
    
    
    Confirm that the pasted columns have updated formula?
    
    ~Manish
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels