Copy a table from an excel sheet to an Embedded Excel Chart Object's Sheet
I need to copy a table(range of cells) from an excel sheet to an Excel Chart Object's Sheet embedded in a PowerPoint Slide
Scenario:
Excel File (Test.xls): Contains a table
Power Point File (Test.ppt): Contains an embedded Excel Chart Object, when I double click on this it shows me two excel worksheets - Chart(this sheet contains a chart), and the other sheet, Sheet1 (contains table which is identical to the table in Test.xls)
How do i copy data from the table in Test.xls to the table in Sheet1 in the object in Test.ppt?
Re: Copy a table from an excel sheet to an Embedded Excel Chart Object's Sheet
set the location of the chart object
Location Method
Moves the chart to a new location.
Syntax
expression.Location(Where, Name)
expression Required. An expression that returns a Chart object.
Where Required Long. Where to move the chart. Can be one of the following XlChartLocation constants: xlLocationAsNewSheet, xlLocationAsObject, or xlLocationAutomatic.
Name Optional Variant; required if Where is xlLocationAsObject. The name of the sheet where the chart will be embedded if Where is xlLocationAsObject or the name of the new sheet if Where is xlLocationAsNewSheet.
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Re: Copy a table from an excel sheet to an Embedded Excel Chart Object's Sheet
Hi
I was unable to do what u said, may be i wasnt implementing it properly,
Attached is a sample Excel and Power Point file. The Table in the Excel sheet is identical to that of the chart's table in the embedded object in the PP slide.
I am trying to find a way out that each time I make changes to the Table in the Excel sheet, I just run a macro and the new values get updated in the Sheet1 of the Embedded object in PP Slide which ofcourse would update the chart.