This project has moved. For the latest updates, please go here.

Setting the title of a chart to a formula

Jan 29, 2013 at 3: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 7:01 PM
Edited Jan 29, 2013 at 7: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 11:26 AM

 

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.