Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Serbia and Montenegro (Yugoslavia)
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel Worksheet to PPT (Office XP)

    I have created an excel worksheet that incorporates a graph with a grid containing the data next to it. I need to take that worksheet, exactly as it is, and put it into a Powerpoint slide. How can I accomplish this?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Excel Worksheet to PPT (Office XP)

    A worksheet is a bit large to fit into a PowerPoint slide "exactly as it is" (65536 rows by 256 columns). But you can select the range you want to show, including the chart, and copy a picture to the clipboard by holding Shift down while selecting the Edit menu; the Copy item will change to Copy Picture. You can paste the picture into a slide.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2004
    Location
    Birmingham, West Midlands, United Kingdom
    Posts
    219
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Worksheet to PPT (Office XP)

    Also, regretfully, the 'copy as picture' trick won't handle a whole 256 x 65536-cell worksheet. Depressingly much less. Pity, as one use for this trick is to send gen to other folk in a way which is completely uneditable.
    Well, I'm sure there are folk here who could do it, but not we ordinary chaps.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Excel Worksheet to PPT (Office XP)

    That will certainly come in handy if you have to do it often.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Excel Worksheet to PPT (Office XP)

    Thanks for sharing it.

  6. #6
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Missouri, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Worksheet to PPT (Office XP)

    I picked up this handy code, and attached to a toolbar because I use it so often.
    (Source: at the bottom of the page http://peltiertech.com/Excel/XL_PPT.html )

    <pre>Sub RangeToPresentation()
    ' Set a VBE reference to Microsoft PowerPoint 10.0 Object Library for Office 2002,

    Dim PPApp As PowerPoint.Application

    Dim PPPres As PowerPoint.Presentation
    Dim PPSlide As PowerPoint.Slide

    ' Make sure a range is selected
    If Not TypeName(Selection) = "Range" Then
    MsgBox "Please select a worksheet range and try again.", vbExclamation, _
    "No Range Selected"
    Else
    ' Reference existing instance of PowerPoint 2002
    Set PPApp = GetObject(, "Powerpoint.Application.10")
    ' Reference active presentation
    Set PPPres = PPApp.ActivePresentation
    PPApp.ActiveWindow.ViewType = ppViewSlide
    ' Reference active slide
    Set PPSlide = PPPres.Slides(PPApp.ActiveWindow.Selection.SlideRa nge.SlideIndex)

    ' Copy the range as a piicture
    Selection.CopyPicture Appearance:=xlScreen, _
    Format:=xlPicture

    ' Paste the range
    PPSlide.Shapes.Paste.Select

    ' Align the pasted range
    PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, True
    PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, True

    ' Clean up
    Set PPSlide = Nothing
    Set PPPres = Nothing
    Set PPApp = Nothing
    End If

    End Sub
    </pre>


    I also have one for Chart ot PPT.

  7. #7
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Missouri, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Worksheet to PPT (Office XP)

    Here is the corresponding one for charts:
    (Source: at the bottom of the page http://peltiertech.com/Excel/XL_PPT.html )
    <pre>Sub ChartToPresentation()
    ' Set a VBE reference to Microsoft PowerPoint 10.0 Object Library for Office 2002,

    Dim PPApp As PowerPoint.Application
    Dim PPPres As PowerPoint.Presentation
    Dim PPSlide As PowerPoint.Slide

    ' Make sure a chart is selected
    If ActiveChart Is Nothing Then
    MsgBox "Please select a chart and try again.", vbExclamation, _
    "No Chart Selected"
    Else
    ' Reference existing instance of PowerPoint 2002
    Set PPApp = GetObject(, "Powerpoint.Application.10")
    ' Reference active presentation
    Set PPPres = PPApp.ActivePresentation
    PPApp.ActiveWindow.ViewType = ppViewSlide
    ' Reference active slide
    Set PPSlide = PPPres.Slides _
    (PPApp.ActiveWindow.Selection.SlideRange.SlideInde x)

    ' Copy chart as a picture
    ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, _
    Format:=xlPicture

    ' Paste chart
    PPSlide.Shapes.Paste.Select

    ' Align pasted chart
    PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, True
    PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, True

    ' Clean up
    Set PPSlide = Nothing
    Set PPPres = Nothing
    Set PPApp = Nothing
    End If

    </pre>


  8. #8
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Missouri, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Worksheet to PPT (Office XP)

    I will try to locate the source of the code, also. [EDIT: I included the links to Jon Peltier's web site). I modified it to use XL2002 rather than XL97.]

    Since I use a Mac at home, I tried these codes in Excel 2001 (Mac OS 9.2.2), and had to slightly modify them:

    I had to change one line in each.

    Set PPApp = GetObject(, "Powerpoint.Application")

    (Remove the reference to Office Number)

Posting Permissions

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