PowerPoint: AddOLEObject

  • Thread starter Ingvar Steffensen
  • Start date
I

Ingvar Steffensen

I'm developing a server-side application in C# which converts Excel
workbooks to PowerPoint presentations.
Currently I'm copying data from Excel (by referencing the dataarea,
i.e. $A$1:$G$7) and using ActiveWindow.View.PasteSpecial to paste the
object as an OLE object.
However, this approach which obviously utilizes the clipboard,
requires a locking mechanism for the clipboard as multiple concurrent
users may wish to convert data simultaneously and so I was hoping to
avoid the use of the clipboard.
Hence, I started looking at the AddOLEObject method and using it's
filename attribute to reference the excel workbook. However, I need to
reference a specific spreadsheet in the workbook. I have tried to use
for instance c:\export.xls!Department!R1C1:R4C10 which would specify
that I am interested in the area R1C1:R4C10 in the Department sheet
which resides in the file c:\export.xls. If I put this in a hyperlink
in another excel sheet in works fine, but as input to this method it
does not seem to work.

Does anyone know how I can use the AddOLEObject method and reference a
specific worksheet in a workbook?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top