How to get the number of rows and columns from the Powerpoint data sheet

  • Thread starter Jegatheesh Rengasamy
  • Start date
J

Jegatheesh Rengasamy

How to get the number of rows and columns from the Power point data sheet

I am using the below code to copy the powerpoint data sheet to excel, But couldn't complete it. Can someone please help me?
wksData.Cells.ClearContents()

'This is a PowerPoint Chart, therefore populate the data table
Dim oGraph As Microsoft.Office.Interop.Graph.Chart = pptShape.OLEFormat.Object
oGraph.HasDataTable = True

For iRow = 1 To oGraph.Application.DataSheet.Rows.Count
For iCol = 1 To oGraph.Application.DataSheet.Columns.Count
wksData.Cells(iRow, iCol) = oGraph.Application.DataSheet.Cells(iRow, iCol).Value
Next
Next


Thanks,
Jag
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top