This project has moved and is read-only. For the latest updates, please go here.

Setting the title of a chart to a formula

Jan 29, 2013 at 4:08 PM

When I attempt to set the title of a chart to a formula it only shows the formula. When you click on the title, the formula does not show up in the formula bar'

 

 chart.Title.Text = "='" + tabName + "'!$A$12";

How do I change this so it shows the value of the formula and not the text itself?

 

Thanks

Jan 29, 2013 at 8:01 PM
Edited Jan 29, 2013 at 8:10 PM

Have a look at this discussion thread https://epplus.codeplex.com/discussions/430509 .  Particulary my post at the bottom that mentions .Formula.ToString();

Jan 30, 2013 at 12:26 PM

 

Doing the following gives me the same result:

 

 

                wsData.Cells["A13"].Formula = "='" + tabName + "'!$A$12";
                chart.Title.Text = wsData.Cells["A13"].Formula.ToString();

It shows me the formula and not the result. Title doesn't have a formula property so I can't set a formula for it.