R
Ram Chepyala
Hi
I am updating the datasheet of embedded Excel.Chart with new values
and saving the powerpoint. When i open the saved PPT i can see the
chart updated, but when i double click on it the values change back to
orginal values and i am losing the updated chart. I am not sure where
i am doing it wrong.I am using the below code to edit datasheet
oPPTFile.Slides(33).Select
Set oPPTShape = oPPTFile.Slides(33).Shapes("Object")
Dim oxl As Excel.Workbook
Dim xchart As Excel.Chart
Set oxl = oPPTShape.OLEFormat.Object
Set xchart = oxl.Charts(1)
Set xlsheet = oxl.Worksheets(1)
xlsheet.Cells(2, 2) = -6
xlsheet.Cells(3, 2) = -7
xlsheet.Cells(2, 3) = 3
xlsheet.Cells(3, 3) = 8
xlsheet.Cells(2, 4) = -11
xlsheet.Cells(3, 4) = -1
xlsheet.Cells(2, 5) = 8
xlsheet.Cells(3, 5) = 4
Set xlsheet = Nothing
Set xchart = Nothing
Set oxl = Nothing
Normally with the MS graphs i use
Set oGraph = oPPTShape.OLEFormat.Object
oGraph.Application.DataSheet.Range("B1").Value =30
oGraph.update
do we have any sort of update for excel chart as well? Many thanks in
advance
I am updating the datasheet of embedded Excel.Chart with new values
and saving the powerpoint. When i open the saved PPT i can see the
chart updated, but when i double click on it the values change back to
orginal values and i am losing the updated chart. I am not sure where
i am doing it wrong.I am using the below code to edit datasheet
oPPTFile.Slides(33).Select
Set oPPTShape = oPPTFile.Slides(33).Shapes("Object")
Dim oxl As Excel.Workbook
Dim xchart As Excel.Chart
Set oxl = oPPTShape.OLEFormat.Object
Set xchart = oxl.Charts(1)
Set xlsheet = oxl.Worksheets(1)
xlsheet.Cells(2, 2) = -6
xlsheet.Cells(3, 2) = -7
xlsheet.Cells(2, 3) = 3
xlsheet.Cells(3, 3) = 8
xlsheet.Cells(2, 4) = -11
xlsheet.Cells(3, 4) = -1
xlsheet.Cells(2, 5) = 8
xlsheet.Cells(3, 5) = 4
Set xlsheet = Nothing
Set xchart = Nothing
Set oxl = Nothing
Normally with the MS graphs i use
Set oGraph = oPPTShape.OLEFormat.Object
oGraph.Application.DataSheet.Range("B1").Value =30
oGraph.update
do we have any sort of update for excel chart as well? Many thanks in
advance