how to add footer row for sum of column base on condition

Posted by: jekin.desai on 3 November 2020, 10:14 pm EST

  • Posted 3 November 2020, 10:14 pm EST

    i am using license version in angular v10. Is there a way to add sum footer in excel sheet for column base on condition. Also that row should always be visible(sticky) (during scrolling).It would be good if you provide some demo or example.
  • Replied 4 November 2020, 9:00 pm EST

    Important is, if is apply filter on that column or change the cell value then SUM should be updated.
    Is there a way to apply formula to cell for an entire column like SUM(A1:A5) without specifying column alphabet name 'A', else i have to dynamically generate alphabet of specific column to apply formula
  • Replied 4 November 2020, 9:23 pm EST

    Hi Jekin,

    You may use the frozenTrailingRowCount() method to freeze rows at the bottom. We are sorry but formulas in SJS works like MS Excel so you need to use the column letter in the formula, to get the column letter from its index, you may use the CalcEngine.rangeToFormula() method. Please refer to the following sample which demonstrates the required functionality:

  • Replied 4 November 2020, 9:28 pm EST

    What about on applying filter on column,the SUM() should change, right now it is not.
  • Marked as Answer

    Replied 4 November 2020, 9:38 pm EST

    To ignore hidden values, you may use the subtotal formula instead of the sum formula.
  • Replied 4 November 2020, 10:28 pm EST

    ok, Thank you!
Need extra support?

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

Learn More

Forum Channels