![]() |
PowerPoint to Excel
Hi, I want to extract data from PowerPoint slides and then paste them into
Excel workbook, where each slide in PowerPoint corresponds to a sheet in Excel workbook and vice-versa (from Excel to PowerPoint). How do I do this? I extracted the data PowerPoint but now how do I make it send to data to Excel? What options/possibilities do I have? |
PowerPoint to Excel
You can only import data if the power point slide is NOT a picture. Is the
power point slide a table or is it ActiveX object like a imbedded word document? Need more information to give you a good answer. Usually Power Point slide are the the real source of the data. Usally poeple get the slide from other sources and paste them inoto the slide presentation. It is probably better to start with the real source. "manzoor" wrote: Hi, I want to extract data from PowerPoint slides and then paste them into Excel workbook, where each slide in PowerPoint corresponds to a sheet in Excel workbook and vice-versa (from Excel to PowerPoint). How do I do this? I extracted the data PowerPoint but now how do I make it send to data to Excel? What options/possibilities do I have? |
PowerPoint to Excel
Well actually its a table and text shapes
"Joel" wrote: You can only import data if the power point slide is NOT a picture. Is the power point slide a table or is it ActiveX object like a imbedded word document? Need more information to give you a good answer. Usually Power Point slide are the the real source of the data. Usally poeple get the slide from other sources and paste them inoto the slide presentation. It is probably better to start with the real source. "manzoor" wrote: Hi, I want to extract data from PowerPoint slides and then paste them into Excel workbook, where each slide in PowerPoint corresponds to a sheet in Excel workbook and vice-versa (from Excel to PowerPoint). How do I do this? I extracted the data PowerPoint but now how do I make it send to data to Excel? What options/possibilities do I have? |
PowerPoint to Excel
See if this helps.
Sub GetSlides() FName = "c:\temp\test.ppt" Set obj = GetObject(FName) obj.Application.Visible = True Set ExcelSht = ThisWorkbook.Sheets(1) NewRow = 1 For Each slide In obj.Slides With slide.Shapes For i = 1 To .Count If .Item(i).HasTable Then Set MyTable = .Item(i).Table For Each MyRow In MyTable.Rows Col = 1 For Each MyCol In MyRow.Cells With ExcelSht Set DataCell = MyCol.Shape.TextFrame.TextRange .Cells(NewRow, Col) = DataCell.Text Col = Col + 1 End With Next MyCol NewRow = NewRow + 1 Next MyRow End If Next End With Next slide obj.Close Set obj = Nothing End Sub "manzoor" wrote: Well actually its a table and text shapes "Joel" wrote: You can only import data if the power point slide is NOT a picture. Is the power point slide a table or is it ActiveX object like a imbedded word document? Need more information to give you a good answer. Usually Power Point slide are the the real source of the data. Usally poeple get the slide from other sources and paste them inoto the slide presentation. It is probably better to start with the real source. "manzoor" wrote: Hi, I want to extract data from PowerPoint slides and then paste them into Excel workbook, where each slide in PowerPoint corresponds to a sheet in Excel workbook and vice-versa (from Excel to PowerPoint). How do I do this? I extracted the data PowerPoint but now how do I make it send to data to Excel? What options/possibilities do I have? |
PowerPoint to Excel
Thanks for getting me startin. Sorry I forgot to tell that I'm Using VSTO C#
so where may I find the GetObject function? "Joel" wrote: See if this helps. Sub GetSlides() FName = "c:\temp\test.ppt" Set obj = GetObject(FName) obj.Application.Visible = True Set ExcelSht = ThisWorkbook.Sheets(1) NewRow = 1 For Each slide In obj.Slides With slide.Shapes For i = 1 To .Count If .Item(i).HasTable Then Set MyTable = .Item(i).Table For Each MyRow In MyTable.Rows Col = 1 For Each MyCol In MyRow.Cells With ExcelSht Set DataCell = MyCol.Shape.TextFrame.TextRange .Cells(NewRow, Col) = DataCell.Text Col = Col + 1 End With Next MyCol NewRow = NewRow + 1 Next MyRow End If Next End With Next slide obj.Close Set obj = Nothing End Sub "manzoor" wrote: Well actually its a table and text shapes "Joel" wrote: You can only import data if the power point slide is NOT a picture. Is the power point slide a table or is it ActiveX object like a imbedded word document? Need more information to give you a good answer. Usually Power Point slide are the the real source of the data. Usally poeple get the slide from other sources and paste them inoto the slide presentation. It is probably better to start with the real source. "manzoor" wrote: Hi, I want to extract data from PowerPoint slides and then paste them into Excel workbook, where each slide in PowerPoint corresponds to a sheet in Excel workbook and vice-versa (from Excel to PowerPoint). How do I do this? I extracted the data PowerPoint but now how do I make it send to data to Excel? What options/possibilities do I have? |
PowerPoint to Excel
I found information for Visual Basic not C# at microsoft
http://msdn.microsoft.com/en-us/libr...63(VS.71).aspx Getobject is equivalent to Createobject and then opening the file using the returned object set obj = Createobject("PowerPoint.Application") obj.Presentations.Open FileName:="c:\My Documents\pres1.ppt", _ ReadOnly:=msoTrue "Joel" wrote: See if this helps. Sub GetSlides() FName = "c:\temp\test.ppt" Set obj = GetObject(FName) obj.Application.Visible = True Set ExcelSht = ThisWorkbook.Sheets(1) NewRow = 1 For Each slide In obj.Slides With slide.Shapes For i = 1 To .Count If .Item(i).HasTable Then Set MyTable = .Item(i).Table For Each MyRow In MyTable.Rows Col = 1 For Each MyCol In MyRow.Cells With ExcelSht Set DataCell = MyCol.Shape.TextFrame.TextRange .Cells(NewRow, Col) = DataCell.Text Col = Col + 1 End With Next MyCol NewRow = NewRow + 1 Next MyRow End If Next End With Next slide obj.Close Set obj = Nothing End Sub "manzoor" wrote: Well actually its a table and text shapes "Joel" wrote: You can only import data if the power point slide is NOT a picture. Is the power point slide a table or is it ActiveX object like a imbedded word document? Need more information to give you a good answer. Usually Power Point slide are the the real source of the data. Usally poeple get the slide from other sources and paste them inoto the slide presentation. It is probably better to start with the real source. "manzoor" wrote: Hi, I want to extract data from PowerPoint slides and then paste them into Excel workbook, where each slide in PowerPoint corresponds to a sheet in Excel workbook and vice-versa (from Excel to PowerPoint). How do I do this? I extracted the data PowerPoint but now how do I make it send to data to Excel? What options/possibilities do I have? |
All times are GMT +1. The time now is 02:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com