Excel C#清除\删除列表的标题

我正试图删除表格中单元格的标题文本。

这是Excel输出的图片: http : //prntscr.com/gs6atr我想从表中删除单元格(10,C),并使其不成为我的表的一部分(超出边界,颜色等.. 。)

这是我的代码:

Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application { DisplayAlerts = false, Visible = true }; if (xlApp == null) { Console.WriteLine("EXCEL could not be started. Check that your office installation and project references are correct."); return; } Workbook wb = xlApp.Workbooks.Open(GlobalVariables.excelReport); Worksheet ws = (Worksheet)wb.Worksheets[1]; int startLineInfo = 10 , endLineInfo = 13; //********// Range tRange = ws.get_Range("C" + startLineInfo, "F" + endLineInfo); tRange.BorderAround2(); //tRange3.Borders tRange.Borders[Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeLeft].LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous; tRange.Borders[Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeRight].LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous; tRange.Borders[Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeTop].LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous; tRange.Borders[Microsoft.Office.Interop.Excel.XlBordersIndex.xlEdgeBottom].LineStyle = Microsoft.Office.Interop.Excel.XlLineStyle.xlContinuous; tRange.Borders.Color = Color.Black; ws.ListObjects.Add(XlListObjectSourceType.xlSrcRange, tRange, Type.Missing, XlYesNoGuess.xlYes, Type.Missing).Name = "InfoTable"; ws.ListObjects["InfoTable"].ShowAutoFilter = false; ws.ListObjects["InfoTable"].TableStyle = "TableStyleMedium3"; ws.ListObjects["InfoTable"].HeaderRowRange[1, 1] = ""; ws.ListObjects["InfoTable"].HeaderRowRange[1, 2] = "Conditions"; ws.ListObjects["InfoTable"].HeaderRowRange[1, 3] = "Req. Min"; ws.ListObjects["InfoTable"].HeaderRowRange[1, 4] = "Req. Max"; ws.ListObjects["InfoTable"].HeaderRowRange[2, 1] = "OCV"; ws.ListObjects["InfoTable"].HeaderRowRange[3, 1] = "CCV"; ws.ListObjects["InfoTable"].HeaderRowRange[4, 1] = "d Ocv-Ccv"; ws.ListObjects["InfoTable"].HeaderRowRange[3, 2] = "TEST!!!";//resultObject.CcvCondition; ws.ListObjects["InfoTable"].HeaderRowRange[2, 3] = "11111"; ws.ListObjects["InfoTable"].HeaderRowRange[3, 3] = "22222"; ws.ListObjects["InfoTable"].HeaderRowRange[4, 3] = "33333"; ws.ListObjects["InfoTable"].HeaderRowRange[2, 4] = "44444"; ws.ListObjects["InfoTable"].HeaderRowRange[3, 4] = "55555"; ws.ListObjects["InfoTable"].HeaderRowRange[4, 4] = "66666"; wb.ExportAsFixedFormat(XlFixedFormatType.xlTypePDF, "c:\\fffffffffffffffffffffffffffff.pdf");