Gets or sets the formula for the XmlMappedRange control, using R1C1-style notation in the language of the user.
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
If the XmlMappedRange control contains a constant, this property returns that constant.
If the XmlMappedRange control is empty, this property returns an empty string.
If the XmlMappedRange control contains a formula, this property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).
If you set the value or formula of an XmlMappedRange control to a date, Microsoft Office Excel checks to see whether that cell is already formatted with one of the date or time number formats. If not, the number format is changed to the default short date number format.
The following code example uses the property to set the value of an XmlMappedRange to equal the square root of cell A1, as specified using R1C1 notation. The formula is localized according to the language of the system it is run on. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerAddress1Cell with a corresponding schema element of type int.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.