在Excel图表上显示标签使用C#

我有这个代码工作正常。 但我想看到图中每列的顶部的数值。 我怎么能做到这一点? 感谢你们每个人和你们的时间。

rowNo += 1; string currDir = Server.MapPath(".") + "\\Dashboard\\"; ExcelApp = new Microsoft.Office.Interop.Excel.Application(); SqlParameter[] dParam = new SqlParameter[0]; System.Data.SqlClient.SqlConnection con = new SqlConnection(strDBConn); System.Data.SqlClient.SqlCommand cmd = new SqlCommand(); if (con.State == ConnectionState.Closed) con.Open(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "Excel_QuoteCount"; cmd.Connection = con; SqlDataReader reader = cmd.ExecuteReader(); oWBook = ExcelApp.Workbooks.Add(Type.Missing); oSheet = (Worksheet)oWBook.Worksheets.get_Item(1); while (reader.Read()) { oSheet.Cells[rowNo, 1] = reader["Date"].ToString(); oSheet.Cells[rowNo, 2] = reader["QuoteCount"].ToString(); oSheet.Cells[rowNo, 3] = reader["Date"].ToString(); oSheet.Cells[rowNo, 4] = reader["QuoteTotal"].ToString(); rowNo++; } oSheet.Columns.AutoFit(); reader.Close(); Range chartRange; Range TotalsRange; ChartObjects xlCharts = (ChartObjects)oSheet.ChartObjects(Type.Missing); ChartObject myChart = (ChartObject)xlCharts.Add(10, 80, 300, 250); Chart chartPage = myChart.Chart; //Quotes Count chartPage.Legend.Clear(); chartRange = oSheet.get_Range("A13", "B20"); chartPage.SetSourceData(chartRange, Type.Missing); chartPage.ChartType = XlChartType.xlColumnClustered; chartPage.Export(@currDir + "QuoteCount.jpg", "JPEG", Type.Missing); //Quotes Count chartRange = oSheet.get_Range("C13", "D20"); chartRange.Font.Bold = true; TotalsRange = oSheet.get_Range("D13", "D20"); TotalsRange.NumberFormat = "$0,000.00"; chartPage.SetSourceData(chartRange, Type.Missing); chartPage.ChartType = XlChartType.xlColumnClustered;// xlColumnClustered; chartPage.Export(@currDir + "QuotesTotal.jpg", "JPEG", Type.Missing); FileInfo theFile = new FileInfo(currDir + "Quotes.xls"); if (theFile.Exists) { theFile.Delete(); } oWBook.SaveAs(currDir + "Quotes.xls", XlFileFormat.xlWorkbookNormal, Type.Missing, Type.Missing, Type.Missing, Type.Missing, XlSaveAsAccessMode.xlExclusive, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); oWBook.Close(true, Type.Missing, Type.Missing); ExcelApp.Quit(); releaseObject(oSheet); releaseObject(oWBook); releaseObject(ExcelApp); 

MSDN系列数据标签

这个链接几乎是你以后的?