From cf137f3a97ac0ebbff2797a10ed883937e951d47 Mon Sep 17 00:00:00 2001 From: KurmithaSF4004 Date: Sat, 13 Apr 2024 10:32:01 +0530 Subject: [PATCH 1/2] 869952-ExportData-Notes --- File-Formats/XlsIO/Working-with-Data.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/File-Formats/XlsIO/Working-with-Data.md b/File-Formats/XlsIO/Working-with-Data.md index 70f7e3422..fbf912f4b 100644 --- a/File-Formats/XlsIO/Working-with-Data.md +++ b/File-Formats/XlsIO/Working-with-Data.md @@ -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 From 7b53c354dc89f8d24b15ba0a69d5ea2972f2cb93 Mon Sep 17 00:00:00 2001 From: KurmithaSF4004 Date: Sat, 13 Apr 2024 11:00:47 +0530 Subject: [PATCH 2/2] 869952-ExportData-Notes --- File-Formats/XlsIO/Working-with-Data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/File-Formats/XlsIO/Working-with-Data.md b/File-Formats/XlsIO/Working-with-Data.md index fbf912f4b..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 ---