简体   繁体   中英

How to read data from excel template

I have a excel template am taking it in a datatable i want to read the datatable and save it in database

my problem is data is not well aligned i want to insert data number wise for eg set of 1 number data then process number 2 data. i have two tables one for saving training details and other for participant

var dtsel = dataTable.Select();

i want to process this dtsel datatable.

i want to read the datatable and save it in database

my problem is data is not well aligned

Then just go ahead and align your data in excel...

One way to do so would be:

  1. Select all your columns in excel.
  2. In data, select the from table/range

在此处输入图片说明

  1. Select all your data, go to transform and select the fill down option

在此处输入图片说明

  1. Your data should now be well aligned, save the new sheet.

在此处输入图片说明 5. Now you can easily import the excel sheet to SQL server, MY SQL or other databases with built in tools

Import data from Excel to SQL Server or Azure SQL Database

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM