Hi, I'm getting result sets from Sybase that I return to a C# client.
I use the below function to write the result set data to Excel:
private static void WriteData(Excel.Worksheet worksheet, string cellRef, ref string[,] data)
{
Excel.Range range = worksheet.get_Range(cellRef, Missing.Value);
if (data.GetLength(0) != 0)
{
range = range.get_Resize(data.GetLength(0), data.GetLength(1));
range.set_Value(Missing.Value, data);
}
}
The data gets written correctly.
The issue is that since I'm using string array to write data (which is a mixture of strings and floats), Excel highlights every cell that contains numeric data with the message "Number Stored as Text".
How do I get rid of this issue?
Many thanks, Chapax