using Excel = Microsoft.Office.Interop.Excel;
private void dele(string filePath)
{
excelApp = new Microsoft.Office.Interop.Excel.Application();
excelApp.Visible = false;
book = excelApp.Workbooks.Open(filePath, Missing.Value, false, Missing.Value, Missing.Value, Missing.Value, true, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
Excel.Worksheet ws = (Excel.Worksheet)book.Worksheets[1];
Excel.Range rng;
rng = (Excel.Range)ws.Rows["1:2", Type.Missing];//根据需要可以变更
rng.Select();
rng.EntireRow.Delete(XlDeleteShiftDirection.xlShiftUp);
excelApp.Application.DisplayAlerts = false;
book.Save();
book.Close(Missing.Value, Missing.Value, Missing.Value);
excelApp.Workbooks.Close();
excelApp.Quit();
System.Diagnostics.Process[] excelprocess = System.Diagnostics.Process.GetProcessesByName("EXCEL");
foreach (System.Diagnostics.Process p in excelprocess)
p.Kill();
MessageBox.Show("OK");
}