PDA

View Full Version : Deleteing excluded columns/rows in MS Graph Datasheet



hilton
11-30-2007, 01:53 AM
Hi, all

I have 12 Powerpoint presentations, each with about 60 slides containing graphs showing trend data.

I need to take the data from these graphs and put it into Excel. This I can do.

What is giving me a problem though is that in many of the graphs some rows or columns have been excluded. So the data are there, just not displayed in the graph. I need to delete these rows/columns before I take tha rest of the datasheet's data into Excel.

Can anyone give me a clue as to how I can Identify hidden rows in the datasheet?

Thanks

figment
12-04-2007, 10:58 AM
if you would post a sample file it would be easyer for people to help.

Andy Pope
12-05-2007, 04:16 AM
There is a Include property for Rows and Columns within the Datasheet object.

So code would be something like...

Sub x()

Dim shpTemp As Shape
Dim grpDataSheet As Graph.DataSheet
Dim lngRow As Long
Dim lngCol As Long

With ActivePresentation.Slides(1)
Set shpTemp = .Shapes(3)
Set grpDataSheet = shpTemp.OLEFormat.Object.Application.DataSheet

For lngRow = 1 To 10
Debug.Print "Row ", lngRow, grpDataSheet.Rows(lngRow).Include
Next

For lngCol = 1 To 10
Debug.Print "Col", lngCol, grpDataSheet.Columns(lngCol).Include
Next

End With

End Sub