Consulting

Results 1 to 3 of 3

Thread: Deleteing excluded columns/rows in MS Graph Datasheet

  1. #1
    VBAX Regular
    Joined
    Jan 2007
    Posts
    6
    Location

    Deleteing excluded columns/rows in MS Graph Datasheet

    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

  2. #2
    VBAX Tutor
    Joined
    Aug 2007
    Posts
    273
    Location
    if you would post a sample file it would be easyer for people to help.

  3. #3
    MS Excel MVP VBAX Mentor Andy Pope's Avatar
    Joined
    May 2004
    Location
    Essex, England
    Posts
    344
    Location
    There is a Include property for Rows and Columns within the Datasheet object.

    So code would be something like...
    [vba]
    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
    [/vba]
    Cheers
    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •