Other API Samples

Live SpreadsheetGear API Samples

Range Samples Formatting and Other Cell Features Orientation

Set text orientation.

// Open file containing sample data and create some local variables.
SpreadsheetGear.IWorkbook workbook = SpreadsheetGear.Factory.GetWorkbook(
SpreadsheetGear.IWorksheet worksheet = workbook.ActiveWorksheet;
SpreadsheetGear.IRange cells = worksheet.Cells;

// Get a reference to the range whose text orientation will be changed.
SpreadsheetGear.IRange range = cells["D2:W2"];

// Set the text orientation for a better fit.
range.Orientation = 65;
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