The cell values in excel are all formatted as text. Each value in the source array is not a String but to a proper data type based upon its value but I want the cell formatted value as it would appear on the screen in excel. Some of the cells contain values of a data type Double -0.000023 but when I do a ToString on the value I get "-2.3E-05". I do not want to use Cell.Value as that would be a lot of overhead and kill performance.
Object[,] source = (Object[,])Data.get_Range("C" + row, Data.get_Range("A1").SpecialCells(Microsoft.Office.Interop.Excel.XlCellType.xlCellTypeLastCell)).Value;
for (X = 0; X < MaxRows; X++)
{
for (Y = 0; Y < MaxCols; Y++)
{
mGridData[X, Y] = Convert.ToString(source[X + 2, Y + 2]);
}
}