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.
Unfortunately, activation email could not send to your email. Please try again.

SFDataGrid and XLSio - multiple sheets to different pages

Thread ID:

Created:

Updated:

Platform:

Replies:

125742 Sep 8,2016 06:41 AM Sep 21,2016 03:00 AM Xamarin.Android 5
loading
Tags: SfDataGrid
Simon Webster
Asked On September 8, 2016 06:41 AM

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

Divakar Subramaniam [Syncfusion]
Replied On September 9, 2016 11:11 AM

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. 


Simon Webster
Replied On September 9, 2016 06:31 PM

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.



Divakar Subramaniam [Syncfusion]
Replied On September 12, 2016 07:27 AM

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. 


Simon Webster
Replied On September 20, 2016 09:02 PM

Ok, thank you

Divakar Subramaniam [Syncfusion]
Replied On September 21, 2016 03:00 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;