Bind to XlsIO workbook?

I would like to create a new workbook by code using XlsIO. I do this using the MVVM pattern which means my ViewModel (which creates the new workbook) usually has no knowledge of the SpreadsheetControl on the UI. Is it possible to bind the workbook which is displayed by SpreadsheetControl to some kind of "workbook" property of my ViewModel?

TIA
Heiko

1 Reply

PS Pannir Selvam S Syncfusion Team January 29, 2013 04:54 PM UTC

Hi  Heiko,

 

Thanks for using Syncfusion product.

 

It is not possible to bind a workbook into the SpreadsheetControl. However you can import a workbook into Spreadsheet by using ImportFromExcel method as shown below.

 

Code Snippet[C#]:

ExcelEngine engine = new ExcelEngine();

IWorkbook workbook = engine.Excel.Workbooks.Add();

this.spreadSheetControl.ImportFromExcel(workbook);

 

Please let us know if any other queries.

 

Regards,

Pannir


Loader.
Up arrow icon