string[] Header = { "Sno", "Product Code", "Product Name", "Quanity", "Price", "Total" }; Excel.Worksheet sht = Globals.ThisAddIn.Application.ActiveSheet as Excel.Worksheet; Excel.Range myHeader = sht.get_Range("A1", "F1"); myHeader.Value2 = Header; myHeader.Columns.AutoFit();