Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel-Powerpoint Denver Charts and Charting in Excel 1 June 21st 09 10:57 AM
Excel - PowerPoint VBA Rob Excel Programming 9 October 13th 08 11:01 AM
excel, powerpoint srm Excel Discussion (Misc queries) 1 January 16th 05 03:40 AM
Excel - Powerpoint Mestrella31 Excel Programming 0 October 18th 04 06:53 PM
Excel to powerpoint toddmbright Excel Programming 1 May 29th 04 03:03 AM


All times are GMT +1. The time now is 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"