You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FransVanEk edited this page Oct 16, 2014
·
2 revisions
Welcome to the ExcelViewModel wiki!
Basic Usage
In your Add-in you can get a hold of the application from the static Globals object. In this example we will get the current workbook instance.
After that we will be able te create a listobject in Excel, on a specific Worksheet ("First demo") with the name "FirstDemoData" starting on location "A1"
The data in the listobject comes from a simple method which creates al object wich implements the WannaApp.Excel.DataObjects.IListObjectDataObject interface.
private void btn_LoadListObject_Click(object sender, RibbonControlEventArgs e){var workbook = new ExcelWorkbook(Globals.ThisAddIn.Application.ActiveWorkbook);
`var list = workbook.FindOrCreateWorksheet("First demo").CreateListObject("A1", GetData(), "FirstDemoData");`
`}`