Other API Samples

Live SpreadsheetGear API Samples

Snippets Formulas

Adds formulas to a range.

IWorkbook workbook = Factory.GetWorkbook();
IWorksheet worksheet = workbook.ActiveWorksheet;
IRange cells = worksheet.Cells;
cells["A1:F10"].Formula = "=ROW()*COLUMN()";
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.