none
Chart in Execel Using VB.net RRS feed

  • Question

  • hi,

       Can anyone helpme , i want to create a Chart in ExcelSheet , i have tried various VB.Net code from internet i got the chart but the problem is while making a BUILD File  "Interop issue" occuring, how can we create a chart without using Microsoft.Office.Interop.Excel Namespace or how to solve that issue.

    Thanks In Advance


    ajay

    Sunday, November 2, 2014 3:37 AM

Answers

  • Hi Ajay,

    >>but the problem is while making a BUILD File  "Interop issue" occuring<<

    Did you mean when you build the project? Can you provide more detail about this error message? Did you add the Microsoft.Office.Interop.Excel assembely reference? And which version of Excel are you using?

    >>how can we create a chart without using Microsoft.Office.Interop.Excel Namespace or how to solve that issue<<

    As far as I know, we can use Excel PIAs or Open XML to create a chart in spreadsheets. To use Excel PIAs, we can use the record macros feature provied by Excel application to get the similar code we wanted.

    And here is anrticle about use OpenXML to insert a chart into a spreadsheet document for your reference:
    http://msdn.microsoft.com/en-us/library/office/cc820055(v=office.15).aspx

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, November 3, 2014 5:29 AM
    Moderator

All replies

  • Hi Ajay,

    >>but the problem is while making a BUILD File  "Interop issue" occuring<<

    Did you mean when you build the project? Can you provide more detail about this error message? Did you add the Microsoft.Office.Interop.Excel assembely reference? And which version of Excel are you using?

    >>how can we create a chart without using Microsoft.Office.Interop.Excel Namespace or how to solve that issue<<

    As far as I know, we can use Excel PIAs or Open XML to create a chart in spreadsheets. To use Excel PIAs, we can use the record macros feature provied by Excel application to get the similar code we wanted.

    And here is anrticle about use OpenXML to insert a chart into a spreadsheet document for your reference:
    http://msdn.microsoft.com/en-us/library/office/cc820055(v=office.15).aspx

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, November 3, 2014 5:29 AM
    Moderator
  • Hi Jay

    According to your description, you can achieve that purpose with help of third-party libraries. As far as I know, Spire.XLS has this feature to enable developers to generate Excel charts including Pie Chart, Column Chart, Bar Chart, Line Chart, Radar Chart in C# and VB.NET, here is programming guide that may help you.

    Generating Excel Charts in C#,VB.NET

    Wednesday, November 5, 2014 8:36 AM