Pseudo code
Worksheet sheet;
Object[,] value1;
Object value2;
value1 = sheet.get_Range("A1", "D8").Value2; // Read a range.
value2 = ((Range)sheet.Cells[1, 1]).Value2 ; //Read the value of the cell.
value2 = sheet.get_Range("A1","A1").Value2; //Read the value of the cell.
if (((Range)sheet.Cells[1, 1]).Value2 != null) // Check the value before get it.
{
value2 = ((Range)sheet.Cells[1, 1]).Value2.ToString();
}
沒有留言:
張貼留言