In EPPlus I can create a chart and set a title of its axis to a string in the following way (F# syntax):
// "chart" is of type "ExcelChart"
chart.XAxis.Title.Text <- "My beautiful label"
When using Excel manually, it is possible to include a formula in chart's labels so that they are dynamic. However, when I set chart.XAxis.Title.Text
to a formula, e.g.
chart.XAxis.Title.Text <- "=Sheet1!$A$1"
my chart ends up displaying the raw, uninterpreted formula. Is there a way to have the formula recalculated each time the underlying cell is modified?
My research shows that EPPlus uses RichText for Axis' title by default and this can't be changed:
(This is the source code of the older version, but I guess it hasn't changed in the most recent one)
I decided to do some manual hacking with the XML structure, which is similar to what's described here: https://stackoverflow.com/a/36387166/2545980