WordPress.org

Forums

TablePress
[resolved] Formula result outside table (2 posts)

  1. Radekim
    Member
    Posted 1 year ago #

    Hi Tobias,
    Thank you very much for great plugin! I went through many topics in this forum with no result regarding this:
    I try to display result from simple formula (SUM) cell outside Tablepress table in a post/page (using e.g. [table-cell id=5 cell=B9 /]) but it always displays nothing but formula itself (e.g. =SUM(B2:B8)).
    Is there a way (can be php) to display output from this formula in a post/page or page template?
    Thanks,
    Radek

    https://wordpress.org/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your post, and sorry for the trouble.

    That's a tricky problem... The Single Cell Shortcode Extension only grabs the raw table data, without evaluating the formulas in it.
    Your best change might therefore be to extend the Single Cell Shortcode by loading the TablePress_Render class. Then, you would have to hook into the tablepress_table_evaluate_data filter and retrieve the evaluated table data, which you can then use as the source for getting a single cell value.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TablePress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic