Hi
You may try the code below which works on my side.
private void button1_Click(object sender, EventArgs e)
{
for (int k = 1; k <= Globals.Sheet1.Rows.Count; k++)
{
Excel.Range cell = ((Excel.Range)Globals.Sheet1.Cells[k,
2]);
cell.NumberFormat = "h:mm:ss";
}
}
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.