We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

SFDataGrid and XLSio - multiple sheets to different pages

Hi.
I see in the Windows RT implementation of sfdatagrid that it is possible to load different sheets in an xls/x file in to to seperate pages of the datagrid using pagination. Similarly when exporting the different pages can be exported to different worksheets within the same workbook.

Is this functionality possible within the android / forms implementation of XLSio and SFDatagrid? IF so, would you be able to supply some example code, please?

Thank you

5 Replies

DS Divakar Subramaniam Syncfusion Team September 9, 2016 03:11 PM UTC

Hi Simon, 
 
 
Thanks for contacting Syncfusion Support. 
 
 
You can export SfDataGrid to excel by using our “SfGridConverter” library. TheDataGridExcelExportingController.ExportToExcel” method will export the grid to an Excel. We have prepared a sample to export the grid to Excel for your reference and you can download the same from the below link. 
 
 
 
 
Please our below UG link for more details about exporting a grid to an Excel. 
 
 
 
For importing data from excel sheet, you can convert the excel sheet to DataTable using our XlsIO control and bind that DataTable to our SfDataGrid. However, DataTable support for Xamarin.Android will be available in our upcoming Volume 3 main release which is scheduled to be rolled out by the end of September.  
 
 
Please refer the below link to know how to convert the excel sheet to DataTable using XlsIO. 
 
 
 
For more information about our XlsIO control and its usages, you can refer the below link. 
 
 
 
 
Regards, 
Divakar. 



SW Simon Webster September 9, 2016 10:31 PM UTC

Divakar, 

Thank you for the response. I have not checked the example yet as I'm not near my dev machine. 

Does the example cover loading separate sheets to different pages in in the datagrid? I need to handle ~10 sheets in a workbook, both import and export whilst allowing the user to access them on the android device. I see that this is possible with the winRT datagrid control, but saw no mention of it for the android control.




DS Divakar Subramaniam Syncfusion Team September 12, 2016 11:27 AM UTC

Hi Simon,  
 
Thanks for the update. 
 
In our sample, we have coded only to export the SfDataGrid to an Excel. You can refer our UG link for more details about customization while exporting.  
 
 
Since the DataTable support for Xamarin.Android will be available only in our upcoming Volume 3 main release, we have not shown how to import an Excel into SfDataGrid. However, we have given all the required help links for it. Thus on following it, you will be able to import data in SfDataGrid from our upcoming release. 
 
Regards, 
Divakar. 



SW Simon Webster September 21, 2016 01:02 AM UTC

Ok, thank you


DS Divakar Subramaniam Syncfusion Team September 21, 2016 07:00 AM UTC

Hi Simon, 
 
Please let us know if you need any other assistance. 
 
Regards, 
Divakar. 


Loader.
Live Chat Icon For mobile
Up arrow icon