We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Inserting OLE-object into Excel sheet

Thanks a lot !

I'll have a try.

Kind regards

I don't find the updated olefiletypes.

Can you give the codes ?

Thanks !

Hi,

To create an OleObject with AVI file, you can use code like following:

FileInputStream fis1 = new FileInputStream(".\\Designer\\pic.emf");
FileInputStream fis2 = new FileInputStream(".\\Designer\\insole.avi");
shapes.addOleObject(10, 10, 0, 0, fis1, fis2, OleFileType.AVI, "insole.avi");
fis1.close();
fis2.close();

For OleFileType, we defined constants as following:

/**
* Represets unkown type file.
*/
byte UNKNOWN = 0;
/**
* Represets the Ms Excel file.
*/
byte XLS = 1;
/**
* Represents the Ms word document.
*/
byte DOC = 2;
/**
* Represents the Power Point.
*/
byte PPT = 3;
/**
* Represents the Acrobat Document.
*/
byte PDF = 4;
/**
* Represents the Audio/Video Interleaved file
*/
byte AVI = 5;

Hello,

Once again I get an error on set licence when using the new jar file !!

Is this new functionality build on the latest version ????

Can you fix this ?

Hi,

Yes the new functionality is added to the latest version 1.9.5.

Could you check, what is the expiry date in your license file? If a fix is released after your expiry date, you have to upgrade your subscription.

Thank you.

Hello,

I'm now able to embed an OLE-object within the sheet !!! Thanks !!

When I embed an OLE-object from file-type AVI, I see it as a package object within Excel.

When I double click on it, the clip is played with an external player (MediaPlayer...).

When I embed a clip within Excel it's known as a Video clip, and I can play it within Excel !

Is this a huge modification ?

Thanks !

Hi,

Glad to know you have made it work successfully! Yes, we have made certain modification to enhance the feature about OleObject, such as recognizing OleObject from template file, embedding known and unknown format file as OleObject.

Can I provide a hyperlink to the addoleobject procedure ?

What to do with the object streamfile ?

Hi,

you can use this method to add OleObject:


public OleObject addOleObject(int row,
int column,
int left,
int top,
java.io.InputStream imageStream,
java.io.InputStream objectStream,
byte fileType,
java.lang.String sourceFullName)

for building the InputStream, if the object file is in local file system, you can build a FileInputStream; if the object file is a remote resouce by a hyperlink, you can build an URLConnection and then get an InputStream by URLConnection.getInputStream().