Other API Samples

Live SpreadsheetGear API Samples

Range Samples Values and Formulas What-If Data Table

Creates a What-If Data Table to calculate various loan totals based on varying interest rates and terms.

// Open workbook with sample data and create some local variables.
SpreadsheetGear.IWorkbook workbook = 
SpreadsheetGear.IWorksheet worksheet = workbook.ActiveWorksheet;
SpreadsheetGear.IRange cells = worksheet.Cells;

// Setup a What-If Data Table on the range C7:H12. Note you do need to include the 
// input row (Row 7) and input column (Column C).
cells["C7:H12"].Table(cells["D4"], cells["D3"]);
Run This Sample
Render Image

Generate an image representation of the results of this sample, which uses the SpreadsheetGear.Drawing.Image class to convert ranges, charts and shapes to images.

Download File

Download an Excel Open XML Workbook (*.xlsx) file with the results of this sample.

Supporting Files

The following files are utilized by this sample:

Related Samples