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

Exporting Data from Excel

i am folowing your guidelines in the support section and using following statement 

DataTable customersTable = sheet.ExportDataTable(worksheet.UsedRange, ExcelExportDataTableOptions.ColumnNames);

unfortunatley the method  ExportDataTable in unrecognizable in my xamarin project.

can you help me with this? essentially i want to select a range of cells and grab it's data

5 Replies

AV Abirami Varadharajan Syncfusion Team February 21, 2017 11:49 AM UTC

Hi Sasan, 
 
XlsIO doesn’t support import and export DataTable features in portable platform. To achieve your requirement, you need to iterate cells manually as shown in the below code sample.

Code Sample:
 
for (int row = 1; row <= 10; row++) 
{ 
    for (int column = 1; column <= 5; column++) 
    { 
        string text = worksheet[row, column].DisplayText; 
    } 
} 
 
Please let us know if you have any concerns. 
 
Regards, 
Abirami. 



SP Sasan Pasha February 21, 2017 10:38 PM UTC

thank you so much 
can you please explain or point me to a direction to explain the difference between 
1- DisplayText
2- Text
3- Value

sometimes i get null back if i use text, but i always get a value back if I use Value - not sure if there is a cost to this?


AV Abirami Varadharajan Syncfusion Team February 22, 2017 12:56 PM UTC

Hi Sasan, 
 
Thank you for updating us. 
 
Please find the property details in the following table. 
 
Property 
Details 
DisplayText 
Returns cell value with its number format. Please refer below documentation to know more about DisplayText property. 
 
Text 
Returns cell value when the cell type is String. Otherwise returns Null. Please refer below link to know more about Text property. 
 
Value 
Returns cell value without it’s number format. Please refer below link to know more about Value property 
 
 
Regards, 
Abirami. 



SP Sasan Pasha February 23, 2017 08:42 AM UTC

Thank you !


AV Abirami Varadharajan Syncfusion Team February 24, 2017 06:42 AM UTC

Hi Sasan, 
 
You are most welcome. 
 
Regards, 
Abirami. 


Loader.
Live Chat Icon For mobile
Up arrow icon