XLL+ Class Library (6.3)

SetFormula Sample

Demonstrates how to set formulae

Overview

This sample add-in shows how to use the CXlOper class to set the formula of a cell, using various techniques.

Breaking changes

In the original version of this sample, the non-const version of CXlOper::GetRef() was used to change the cell of a reference CXlOper "in-place". This technique is no longer available, and the replacement method CXlOper::MoveRefBy has been used instead. Please see Breaking changes - GetRef for details.

Classes and functions used

CXlOper::SetFormula | CXlOper::SetFormulaIntl | CXlOper::SetLongFormula | CXlOper::SetLongFormulaIntl | CXlOper::ConvertFormula | CXlOper::ConvertFormulaIntl | CXlOper::MoveRefBy

Sample project

Each sample project is located in a sub-directory of the Samples directory of the XLL+ installation. To use the sample project, open the solution file SetFormula.sln or the project file SetFormula.vcproj.

You can enable debugging under Excel by using the Setup Debugging command in the XLL+ ToolWindow.

When delivered, the help files are excluded from the build. You can enable the help build by selecting the files SetFormula.help.xml and SetFormula.chm in the Solution Explorer, and using the right-click menu to view Properties. Select the page "Configuration Properties/General" and set the "Excluded from build" property to "No". See Generating help in the User Guide for more information.

See Also

List of Sample Projects