Other API Samples Values from Array SpreadsheetGear API SampleRange Samples Values and Formulas Values from ArrayDescriptionSet cell values from a two-dimensional object array.Sample Source Code// Create a new workbook and some local variables. SpreadsheetGear.IWorkbook workbook = SpreadsheetGear.Factory.GetWorkbook(); SpreadsheetGear.IWorksheet worksheet = workbook.ActiveWorksheet; SpreadsheetGear.IRange cells = worksheet.Cells; // Get a reference to a range of cells. SpreadsheetGear.IRange range = cells["A1:J100"]; // Create an array of values matching the size of // the range which is 100 rows x 10 columns. int rowCount = range.RowCount; int colCount = range.ColumnCount; object[,] values = new object[rowCount, colCount]; for (int row = 0; row < rowCount; row++) { for (int col = 0; col < colCount; col++) values[row, col] = "Cell=" + range.WorkbookSet.GetAddress(row, col); } // Set the array values into the range. range.Value = values; // AutoFit the range. range.Columns.AutoFit();