Thursday 15 April 2010

c# - Excel VSTO persist data entered into a WinForm -


I have an Excel 2010, VSTO application in C # which I am working on. I've created a WinForm that uses XSD data collection to take the user input on the form. How do I get the data inside this XSD to stay from one use to the workbook? Obviously, I need to come up with some kind of "save" routine when data is entered and I want to do a regular search to populate the form on later use (with previously saved data) I am I am unable to find reliable sources for such VSTO examples.

Take a look at this CodeProject page,. I have used it in the Extle VSTO applications in which WinForms is included and it works beautifully

In short, you are able to include it in any of your control to customize it Very easy to do, is not already made in the class, able to make two calls in your code:

  FormSerialisor.Serialise (this, myPath + @ "\ myFormName.xml");   

and

  form serializer. Directly (this, myPath + @ "\ myFormName.xml");   

Very simple and very fast. It is written in C #, but it can be used as a virtual class in VB.Net projects and then .dll

No comments:

Post a Comment