Not absolutly accurate, sorry. You cannot use the api to edit or create
macros but any macros that exist in a workbook that you open will be
preserved. Most people tend to create a template file using Excel and
'embed' the macros they want to use into that. Next, they use POI to open
the template file, populate the sheets with data and then save it all away
again.

With regard to OLE, it is certainly possible to gain access to objects that
are embedded into a workbook - although the ease with which this can be done
varies - but I cannot say that it is definitvely possible to insert objects
into a worksheet/workbook using POI. What is possible is to insert pictures
and I wonder if it is posible to use the same or a similar mechanism to
insert a different kind of object; but I have never tested this hypothesis.
Again, the workaround is to use Excel to insert any objects and then open
that file using POI so that it can be populated further. Just like macros,
embedded objects are preserved when the file is opened/resaved using POI.

Yours

Mark B


李强 wrote:
> 
> You can not.
> You can only preserve the macro and OLE objects from the template files.
> 
> 
> On 2/22/10, Raghvendra Dharmapurikar <[email protected]> wrote:
>>
>> Hi,
>>
>> Does anyone know if we can create excel sheet with macro and OLE objects
>> using POI APIs?
>>
>> Thanks,
>> Raghvendra
>>
>> On Wed, Feb 17, 2010 at 7:38 PM, Raghvendra Dharmapurikar <
>> [email protected]> wrote:
>>
>> > Hi,
>> >
>> > Does Excel (XSSF) APIs support adding macro and OLE obejcts to the
>> Excel
>> > sheet?
>> >
>> > Thank you.
>> >
>> >
>>
> 
> 
> 
> -- 
> ccc
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Macro-and-OLE-support-in-Excel-tp27624165p27684309.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to