diff --git a/File-Formats/XlsIO/Working-with-Data.md b/File-Formats/XlsIO/Working-with-Data.md index 70f7e3422..abff0805d 100644 --- a/File-Formats/XlsIO/Working-with-Data.md +++ b/File-Formats/XlsIO/Working-with-Data.md @@ -1,7 +1,7 @@ --- title: Working with Data | Syncfusion description: Learn how to import data to Excel file from ADO.NET objects, Collections, Array; and how to export data from Excel to ADO.NET objects or collections. -platform: file-Formats +platform: file-formats control: XlsIO documentation: UG --- @@ -2244,7 +2244,7 @@ using (ExcelEngine excelEngine = new ExcelEngine()) IWorksheet worksheet = workbook.Worksheets[0]; //Read data from the worksheet and Export to the DataTable - DataTable customersTable = worksheet.ExportDataTable(worksheet.UsedRange, ExcelExportDataTableOptions.ColumnNames); + DataTable customersTable = worksheet.ExportDataTable(worksheet.UsedRange, ExcelExportDataTableOptions.ColumnNames | ExcelExportDataTableOptions.ComputedFormulaValues); //Saving the workbook as stream FileStream stream = new FileStream("ExportToDT.xlsx", FileMode.Create, FileAccess.ReadWrite); @@ -2264,7 +2264,7 @@ using (ExcelEngine excelEngine = new ExcelEngine()) IWorksheet worksheet = workbook.Worksheets[0]; //Read data from the worksheet and Export to the DataTable - DataTable customersTable = worksheet.ExportDataTable(worksheet.UsedRange, ExcelExportDataTableOptions.ColumnNames); + DataTable customersTable = worksheet.ExportDataTable(worksheet.UsedRange, ExcelExportDataTableOptions.ColumnNames | ExcelExportDataTableOptions.ComputedFormulaValues); //Binding exported DataTable to data grid, likewise it can binded to any //user interface control which supports binding @@ -2283,7 +2283,7 @@ Using excelEngine As ExcelEngine = New ExcelEngine() Dim sheet As IWorksheet = workbook.Worksheets(0) 'Read data from the worksheet and Export to the DataTable - Dim customersTable As DataTable = sheet.ExportDataTable(sheet.UsedRange, ExcelExportDataTableOptions.ColumnNames) + Dim customersTable As DataTable = sheet.ExportDataTable(sheet.UsedRange, ExcelExportDataTableOptions.ColumnNames Or ExcelExportDataTableOptions.ComputedFormulaValues) 'Binding exported DataTable to data grid, likewise it can binded to any 'user interface control which supports binding