Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

New Post: How do I create a new instance of Worksheet?

$
0
0
not sure i understand as well...

You want inherite from Worksheet and replace the origin with your own in com proxy management?

If its true:
Override Worksheet as your will and spend necessary ctors(redirect all to base).
After the add method from sheets, use the replace ctor in your custom worksheet class.

here it is(from NetOffice.ExcelApi.Worksheet.cs):

///<param name="replacedObject">object to replaced. replacedObject are not usable after this action</param>
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public Worksheet(COMObject replacedObject) : base(replacedObject)
{

}

Now, your custom instance is part of the proxy management instead of the origin instance.


*Sebastain

Viewing all articles
Browse latest Browse all 1741

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>