Fields with wanted Excel formulas don't work anymore

Created on 25 November 2024, 6 months ago

Our exports generate Excel formulas in specific columns. Since the changes in issue #3268139 were merged in, they have stopped working correctly. They now show the user the formula because of the prepended apostrophe.

In the source issue's initial proposed resolution, the following is mentioned: "If needed in the interface create an option that will allow formulas for certain field values."

Will such an option be implemented? If not on a per-field basis, could it be applied by view or, at least, globally?

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada samalander

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @samalander
  • πŸ‡ΊπŸ‡ΈUnited States jhedstrom Portland, OR

    I think perhaps adding some dedicated field formatters for select formula (an obvious formula would be HYPERLINK) may make sense to work around this issue.

  • πŸ‡¨πŸ‡¦Canada samalander

    HYPERLINK is a formula we use, so that would be useful. But it isn't the only formula, for example:

    We have a form where people can submit nominations for an award. The form has several questions. Once the nomination period ends, we export the nominations in an Excel sheet. This sheet contains some blank fields for the judges to fill in according to their desires. Excel formulas calculate scores for each nomination, making it easy for judges to determine the award winners.

    Another use could be a semi-filled order form with products and prices listed, along with a user-fillable quantity column. When something is put in the quantity, the price for the item and the order total get calculated.

  • πŸ‡«πŸ‡·France mably

    It looks like we cannot reenable formulas in content for security reasons.

    But we could allow predefined formulas on a per column basis I guess.

    Could it help?

  • πŸ‡«πŸ‡·France mably

    I would be even better to be able to add some new formula field to the list of fields.

    Don't know if it's feasible though. Will have to have a look.

  • Merge request !45Resolve #3489727 "Fields with wanted" β†’ (Open) created by mably
  • πŸ‡«πŸ‡·France mably

    Worked on an MR that allows adding a new "Excel formula" type of field:

    Any feedback will be greatly appreciated.

  • πŸ‡¨πŸ‡¦Canada samalander

    That looks like it could solve most of our problems! I will give it a try as soon as I can.

    It would be helpful to allow formulas to include data from other columns. Referencing, as in #7 screenshot, will be tremendously useful. But when a column is excluded from the display, its data would need to be included directly in the formula (HYPERLINK, seems like a good example of this need). It seems that implementing this would necessitate complete TWIG templating.

  • πŸ‡«πŸ‡·France mably

    The following issue will allow to hide columns on Excel side: ✨ Allow styling table cells using field formatters from core Needs work

    We could also imagine using Drupal tokens in the formula field.

Production build 0.71.5 2024