When doing the project, C # reads the Excel data into a DataTable or dataset, sets breakpoints to view the DataTable, A field that finds Excel displayed as a number of long digits, such as 0.000012, is shown in the DataTable as scientific notation 1.2E-05, while a percentage such as 143% appears in the DataTable as 1.43. But I want to show in Excel what data, read to a DataTable or DataSet and excel in exactly the same way, the solution is as follows:
1) Open the Excel you want to import, select all the data (Ctrl + a)----copy (ctrl + C);
2) Create a new Notepad file, open it, paste it up (Ctrl + V);
3) Return the open Excel document, delete all the data inside, then select All (Ctrl + a) and right-click on ' Format Cells '----point ' text '----OK to exit the dialog box;
4) Then paste all the data in the open Notepad into Excel and save the small green triangle in the upper left corner of the data cell;
5) Once you have done this, all the data in Excel is stored in text format, and then the import is no problem.
Reference Document: http://blog.csdn.net/hcf_force/article/details/7824058
Resolves an issue where the data type changes when importing a database from Excel into a DataTable (such as the number type becomes scientific notation and the percentage becomes a decimal)