Other API Samples

Live SpreadsheetGear API Samples

Snippets Interior Color (RGB)

Applies a color to a range using an RGB value.

IWorkbook workbook = Factory.GetWorkbook();
IWorksheet worksheet = workbook.ActiveWorksheet;
IRange cells = worksheet.Cells;
cells["B2:E9"].Interior.Color = Color.FromArgb(255, 89, 136, 221);
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.