There is a cmdlet in the PowerTools for OpenXML that creates a chart. You might find that useful. The file ChartsheetAccessor.cs contains the code for creating charts.
I will look into the PowerTools for OpenXML.
Hi Waseem – You might try OfficeWriter, which has a full blown charting API. By using the ExcelApplication object in the OfficeWriter library, you’d have access to an entire object model representing various parts of an XLSX workbook, including creating/modification of charts/series etc. You can take a look at the code sample here. Additionally you can also take a look at the docs.
Disclaimer: I am one of the developers on the OfficeWriter team. Let me know if you have any questions! -Ozgur
Hi Ozgur, Thank you very much for your reply. I found a very good code sample to create table (from dataset) in Excel and than by using SpreadSheetLight I am drawing charts. I will give a try to your OfficeWriter in near future. Thanks once again!