Iam new to xamarin.I have created a Xamarin android project and added Syncfusion package using nuget.
I have tried to implement the below code but Iam getting an error stating ImportDataTable is not available
ExcelEngineexcelEngine=newExcelEngine();IApplicationapplication=excelEngine.Excel;application.DefaultVersion=ExcelVersion.Excel2013;IWorkbookworkbook=application.Workbooks.Create(1);IWorksheetworksheet=workbook.Worksheets;DataTabletable=SampleDataTable();//Import DataTable to the worksheet.worksheet.ImportDataTable(table,true,1,1);workbook.SaveAs("ImportFromDT.xlsx");workbook.Close();excelEngine.Dispose();
On further examination I see that only ImportData function is implemented and functions to implement imports of data table and lists are not implemented. I have added references to Syncfusion.XlsIO.Portable and Syncfusion.Compression.Portable. Is this because of any old version of Sync fusion libraries that Iam using. If so , how to download the latest one. (I can see from "Manage nuget package" space that Iam using the latest version of XLSIO.)
AVAbirami Varadharajan Syncfusion Team November 28, 2016 12:50 PM UTC
Thank you for contacting Syncfusion support.
XlsIO provides portable class library for Xamarin platform. As the datatable is not supported in portable platform, so XlsIO doesn’t support import data table into worksheet. However, you can convert the data table into an enumerable object and then import that object into worksheet using Worksheet.ImportData() method.
To know more about import data into worksheet, kindly refer the following UG documentation link for your reference.