how can i show column height in excel chart through c# code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zohaibanwar
    New Member
    • Oct 2009
    • 1

    how can i show column height in excel chart through c# code

    this is the part of code i have completed
    Code:
    Excel.Range chartRange;
            Excel.ChartObjects xlCharts = (Excel.ChartObjects)xlWorkSheet.ChartObjects(Type.Missing);
            Excel.ChartObject myChart = (Excel.ChartObject)xlCharts.Add(10, 80, 500, 250);
    
            Excel.Chart chartPage = myChart.Chart;
    
            chartRange = xlWorkSheet.get_Range("A1", "d9");
            chartPage.SetSourceData(chartRange, misValue);
            chartPage.ChartType = Excel.XlChartType.xlColumnClustered;
            chartPage.Export(@"C:\Documents and Settings\Visual Studio 2005\WebSites\Compare\chart.jpg", "JPG", misValue);
    
           
            string fileName = @"E:\npt.xls";
            
            xlWorkBook.SaveAs(fileName, Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
            xlWorkBook.Close(true, misValue, misValue);
            xlApp.Quit();
    Now i want to show the height of each column in the char

    Can any one help me out in this problem?
    Last edited by tlhintoq; Oct 30 '09, 07:20 AM. Reason: [CODE] ...your code here...[/CODE] tags added
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.

    Comment

    Working...