Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

edit chart data in powerpoint

I would like to edit the values of a chart within a powerpoint file. I can't seem to find the appropriate methods like .Range and .Cell anywhere.

 ActivePresentation.Slides(sl).Shapes(sh).Chart.DataTable

does not seem to have all the methods in the conventional DataTable method.

like image 497
Jackery Xu Avatar asked Dec 15 '22 23:12

Jackery Xu


1 Answers

Something like this should work:

With ActivePresentation.Slides(sl).Shapes(sh).Chart.ChartData
    .Activate
    .Workbook.Sheets(1).Range("A1").Value = "test_data"
    .Workbook.Close
End With
like image 105
Dmitry Pavliv Avatar answered Dec 28 '22 00:12

Dmitry Pavliv