Resize viewable range of excel sheet OLEObject in ppt

M

MarkChapin

I want to automatically add an excel sheet to a powerpoint slide. If I open
excel, and copy/paste a specific range, it looks fine. If I use VB or access
the AddOLEObject method through an ActiveX server, I can't figure out how to
change the range the user sees in Powerpoint. My sheet has many columns, but
I only want the user to see columns A:J, for example. The AddOLEObject
method make many more columns visible.

I've tried setting the Height/Width property but it only rescale the size,
it doesn't change the sheet range that is seen.

Does anyone know how to change this property?

This is my ActiveX version, I'm using Matlab. I can see all the
method/prorerties as I see in VB.


xls=new_slide.Shapes.AddOLEObject(10,10,-1,-1,'',fn,0,'msoFalse',0,'',0);

VB code examples are OK.

Mark
 
C

Cindy M.

Hi =?Utf-8?B?TWFya0NoYXBpbg==?=,
I want to automatically add an excel sheet to a powerpoint slide. If I open
excel, and copy/paste a specific range, it looks fine. If I use VB or access
the AddOLEObject method through an ActiveX server, I can't figure out how to
change the range the user sees in Powerpoint. My sheet has many columns, but
I only want the user to see columns A:J, for example. The AddOLEObject
method make many more columns visible.

I've tried setting the Height/Width property but it only rescale the size,
it doesn't change the sheet range that is seen.

Does anyone know how to change this property?
In a nutshell: you can't do it. There is no automation interface to regulate the
number of rows and columns presented by an embedded Excel OLE object.

Closest workaround I've ever found is to
- create a "starting" workbook with "placeholder data" in exactly the number
of rows and columns required
- insert an object from this file
- automate the object and populate it with the real data

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
S

Steve Rindsberg

In a nutshell: you can't do it. There is no automation interface to regulate the
number of rows and columns presented by an embedded Excel OLE object.

But if linking is a possibility, I think you can change that simply by editing the
OLE shape's link source property.
 
M

MarkChapin

Thanks for the help. After two days for searching, I gave up. I just add
the OLEObject as an icon, do a CopyPicture of region of interest and paste it
into the slide. Just for curiosity, I'll try your suggestions.

Thanks again.

Mark
 

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