Scrolling chart in Excel or Powerpoint 2007/2010

I have a chart that has a large number of points on the x-axis. (Like an ECG).

How to place this diagram as horizontally scrolling object in Powerpoint 2007/2010? If I just paste it, it will be resized to fit the width and become unreadable.

I want to maintain height, including the horizontal scrollbar for the chart.

+3
source share
2 answers

I'm not sure if it can be done. Having said that, I can give you an interesting alternative. :)

Say our chart looks like this in Excel

enter image description here

Copy. Ms Paint . , C:\MyChart.Jpg

MS Powerpoint Developer. (. ). "" "Microsoft Web Browser" . . Command. Show Chart - , :)

enter image description here

Private Sub CommandButton1_Click()
    WebBrowser1.Navigate "C:\MyChart.jpg"
End Sub

F5, . .

enter image description here

, , :)

enter image description here

1) MS Powerpoint. Excel , .

2) PPT. PPT, ( , PPT )

Private Sub CommandButton1_Click()
    WebBrowser1.Navigate ActivePresentation.Path & "\MyChart.jpg"
End Sub

xls ppt , excel temp directory. Webbrowser1

+3

, :)

        xls ppt , excel . Webbrowser1

   Followup

       @ : ! , . ( ).

   ;)

PowerPoint Excel, .

enter image description here

, , "- Microsoft" " ". - Excel, .

.

enter image description here

... ... ;)

Option Explicit

Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" _
(ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long

Private Const MAX_PATH As Long = 260

Dim ImageFile As String

Private Sub CommandButton1_Click()
    ExtractToTemp
    WebBrowser1.Navigate ImageFile
End Sub

Sub ExtractToTemp()
    Dim oSl As PowerPoint.Slide
    Dim oSh As PowerPoint.Shape

    Dim oXLApp As Object, oXLWB As Object, oXLSht As Object
    Dim mychart As Object

    Set oSl = ActivePresentation.Slides(1)

    Set oSh = oSl.Shapes(1)

    With oSh.OLEFormat.Object.Sheets(1)
        .Shapes(1).Copy
    End With

    '~~> Establish an EXCEL application object
    On Error Resume Next
    Set oXLApp = GetObject(, "Excel.Application")

    If Err.Number <> 0 Then
        Set oXLApp = CreateObject("Excel.Application")
    End If
    Err.Clear
    On Error GoTo 0

    oXLApp.Visible = False

    '~~> Open the relevant file
    Set oXLWB = oXLApp.Workbooks.Add
    Set oXLSht = oXLWB.Worksheets(1)

    oXLSht.Paste

    '~~> Save Picture Object
    ImageFile = TempPath & "Tester.jpg"

    If Len(Dir(ImageFile)) > 0 Then Kill ImageFile

    Set mychart = oXLSht.ChartObjects(1).Chart
    mychart.Export FileName:=ImageFile, FilterName:="jpg"

    '~~> Wait till the file is saved
    Do
        If FileExists(ImageFile) = True Then Exit Do
        DoEvents
    Loop

    '~~> Clean Up And Close Excel
    oXLWB.Close SaveChanges:=False
    oXLApp.Quit

    Set oXLWB = Nothing
    Set oXLApp = Nothing
End Sub

'~~> Get User TempPath
Function TempPath() As String
    TempPath = String$(MAX_PATH, Chr$(0))
    GetTempPath MAX_PATH, TempPath
    TempPath = Replace(TempPath, Chr$(0), "")
End Function

'~~> Function tot check if file exists
Public Function FileExists(strFullPath As String) As Boolean
    On Error GoTo Whoa
    If Not Dir(strFullPath, vbDirectory) = vbNullString Then FileExists = True
Whoa:
    On Error GoTo 0
End Function

. . , , :)

https://skydrive.live.com/redir.aspx?cid=cdd3f8abe20bbe3b&resid=CDD3F8ABE20BBE3B!162&parid=root

+2

All Articles