hi
i want to have line graphs for each column and save the graphs in png form like below an example was attached
Attachment 1494
hi
i want to have line graphs for each column and save the graphs in png form like below an example was attached
Attachment 1494
Add data column manually and Try below code to export chart as PNG file:
Code:Sub Lalit_Test() With ThisWorkbook.Worksheets("Sheet2") .ChartObjects("Chart 5").Chart.Export ThisWorkbook.Path & Application.PathSeparator & "Chart_5_" & Format(Now, "DD-MM-YY_HH.MM.SS_AM/PM") & ".PNG" End With End Sub
Last edited by LalitPandey87; 02-27-2014 at 08:26 AM.
and a tweak to plot and export multiple charts from Worksheet "min max & march of khamir"Code:Sub blah() With ThisWorkbook.Worksheets("min max & march of khamir") For i = 1 To 61 Step 2 lr = .Cells(Rows.Count, i + 1).End(xlUp).Row .ChartObjects("Chart 2").Chart.SetSourceData Source:=.Range(.Cells(1, i), .Cells(lr, i + 1)) .ChartObjects("Chart 2").Chart.Export ThisWorkbook.Path & Application.PathSeparator & "Chart " & Format(i, "00") & " " & Format(Now, "DD-MM-YY_HH.MM.SS_AM/PM") & ".PNG" Next i End With End Sub
Bookmarks