How to get a chart title from a worksheet cell in c#?

  • Thread starter Thread starter ivo
  • Start date Start date
Hi Alvin,

I am trying in c# to put a formula to chart title field:

chart.ChartTitle.Text = "=Sheet1!$A$1";

The result is, I get as title the text of field A1,
but only once. If I change A1 to another text,
the chart title would not change.
There is not any link/connection to worksheet.

Ivo

you need to say a little bit more than that to get help. the last psychic in
here quit...

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

ivo said:
Hello,
how do I link a worksheet cell with chart title field in c#?

Ivo
 
I am trying in c# to put a formula to chart title field:

chart.ChartTitle.Text = "=Sheet1!$A$1";

The result is, I get as title the text of field A1,
but only once. If I change A1 to another text,
the chart title would not change.
There is not any link/connection to worksheet.

I suggest you use the Excel Macro Recorder to create the VBA code for you
which will achieve what you want, then convert it to C#.
 
Mark,
sorry.
The code make by macro recorder can not be taken to c#.
The formula is not taken.
Ivo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top