Well, you may use Worksheet.Charts Property to get the collection of the designer chart. To get a specific chart, you may get by its index position.
E.g., Chart chart = workbook.Worksheets[0].Charts[0];// retrieves the first chart in the first worksheet.
- to recuperate the entries of a formula, for example we have (=SUM(A1/A4) and this method should return A1 and A4
Well, you may use Cell.Formula Property to get the formula string of the cell. And you may use Cell.StringValue Property to get the resultant value. To get the result of a formula at runtime, you will use this property after calling Workbook.CalculateFormula() method.
- to recuperate the entries of a chart
Well, after getting the designer chart object , you will use all those APIs (Classes, Properties, methods etc.), which are used to create a chart from the scratch. To know more about the Chart Related APIs, you can check the source code of the chart demos in our online featured demos.
1. Well, Cells.FindFormulaContains("formula string",...) method retrieves the formulated cell searching the formula which contains formula string or part of the formula string. For example, you may give here (part of formula string) "=SUM" or "A1:A3", it will search that part in all the formulated cells and returns the first cell which contains that formula string or part of the formula string.
2. Cells.FindFormula() also searches the formula string and retrieves the first cell which contains that formula. But to use this method, you have to make sure that you will give the complete formula string "=SUM(A1:A3)" and not the part of the formula string, without eliminating any part or character of it. If it does not match the complete formula string like "=SUM(A1:A3", a NullReferenceException will be thrown and formula is not searched. Got it!
Is it possible to search formulas without to know their value ?
Yes, you may try to use Cell.IsFormula Boolean Property. The property will return true if the cell contains the formula, otherwise false.