Skip to end of metadata
Go to start of metadata
ExcelApplication supports all math, string, boolean, time, statistical, database, lookup and reference formulas or functions that are part of Excel. ExcelWriter does not calculate formulas at run-time; all formulas are calculated when the workbook is opened in Excel.

To insert a formula in a cell, use the propertyCell.Formula. Begin the formula string with =, as you would when entering a formula in Microsoft Excel:

ExcelWriter allows you to use values from a different sheet when assigning a formula to a cell, as in the following examples:

The property Cell.Name returns a cell's Excel-style name (e.g., "B5"). This property can be useful if you want to build a formula string using row and column indexes, rather than cell names, for example:

Example

Here is an example that demonstrates how to use Formulas with ExcelApplication:

Code Sample

This sample shows many of the core features of ExcelApplication, including the use of formulas.

[C#] | [VB.NET]

  • No labels