From 0b8fb538b621f95a8dfea7cecec9a83054a2d971 Mon Sep 17 00:00:00 2001 From: KurmithaSF4004 Date: Sat, 13 Apr 2024 11:29:01 +0530 Subject: [PATCH 1/3] 871981-ImportData-Notes --- File-Formats/XlsIO/Working-with-Data.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/File-Formats/XlsIO/Working-with-Data.md b/File-Formats/XlsIO/Working-with-Data.md index 70f7e3422..199153fbf 100644 --- a/File-Formats/XlsIO/Working-with-Data.md +++ b/File-Formats/XlsIO/Working-with-Data.md @@ -24,6 +24,8 @@ The following code snippet illustrates on how to import a DataTable into a works N> XlsIO supports importing of data from data table to worksheet in Windows Forms, WPF, ASP.NET, ASP.NET MVC and ASP.NET Core (2.0 onwards) platforms alone. +N> When the data table column contains numbers and date values formatted as text, they will be imported as string type only. The number formatting applied to the data table column values will not be effective. To address this, the data table column values should be preserved with their respective data type. + {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} using (ExcelEngine excelEngine = new ExcelEngine()) From 0fcbc7fd62c1a1f0ea3a338fe9cef5a51c8d09c8 Mon Sep 17 00:00:00 2001 From: KurmithaSF4004 Date: Sat, 13 Apr 2024 13:31:05 +0530 Subject: [PATCH 2/3] 871981-ImportData-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 199153fbf..5525ed19b 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 --- From c309d5dd5e076438acb76b1deda2114549bebf56 Mon Sep 17 00:00:00 2001 From: MOHAN CHANDRAN <93247949+Mohan2401@users.noreply.github.com> Date: Mon, 15 Apr 2024 12:18:36 +0530 Subject: [PATCH 3/3] Update Working-with-Data.md --- File-Formats/XlsIO/Working-with-Data.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/File-Formats/XlsIO/Working-with-Data.md b/File-Formats/XlsIO/Working-with-Data.md index 5525ed19b..c7c16d57d 100644 --- a/File-Formats/XlsIO/Working-with-Data.md +++ b/File-Formats/XlsIO/Working-with-Data.md @@ -24,8 +24,6 @@ The following code snippet illustrates on how to import a DataTable into a works N> XlsIO supports importing of data from data table to worksheet in Windows Forms, WPF, ASP.NET, ASP.NET MVC and ASP.NET Core (2.0 onwards) platforms alone. -N> When the data table column contains numbers and date values formatted as text, they will be imported as string type only. The number formatting applied to the data table column values will not be effective. To address this, the data table column values should be preserved with their respective data type. - {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} using (ExcelEngine excelEngine = new ExcelEngine()) @@ -83,6 +81,8 @@ End Using A complete working example to import data from DataTable to Excel worksheet in C# is present on [this GitHub page](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Import%20and%20Export%20Data/DataTable%20to%20Worksheet). +N> XlsIO imports the data from data table into Excel worksheet based on the data table column type. So, it is suggested to create the data tables with required column types such as number, text or date time before importing the data table to Excel worksheet. + ### Import Data from DataColumn The following code snippet illustrates how to import DataColumn into a worksheet using [ImportDataColumn](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_ImportDataColumn_System_Data_DataColumn_System_Boolean_System_Int32_System_Int32_) method.