I am using exceljs (https://www.npmjs.com/package/exceljs) node package to read excel file.
I am looking for fast import csv with 2000 records into SQL Server.
Table:
User [Id PK]
Role [UserId FK]
Unit [UserId FK]
Excel file:
UserName Role Unit
Jack 1 Unit1
@Furqan, did you try executing BULK INSERT command to import CSV file contents into SQL Server database table
Here is sample target table
create table UploadTable (
[User] varchar(100),
[Role] varchar(100),
Unit varchar(100)
)
After you create your table try following SQL command
BULK INSERT UploadTable FROM 'c:\kodyaz\upload.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '0x0A'
)