0

Please I have issue that when I try to import data from excel to table in SQL it fails with below errors even I modified all the tables in the tables to be nvarchar(max) and I tried to enter dummy data in the first row

enter image description here

2
  • Would highly recommend saving as tab or pipe delimited, and using the flat file source. Otherwise, you can try updating the registry entry which controls the number of lines that the driver will scan in the Excel file to determine the length of the field. By default, it's only like the first 20 lines (don't quote me). Also, would recommend not using a $ sign in your table name. You can change it right in the import wizard.
    – Jacob H
    Apr 4, 2019 at 13:48
  • I tried but didn't work correctly because there is Arabic inputs so it gives me question marks
    – Eng.Bassel
    Apr 7, 2019 at 9:15

2 Answers 2

0

It worked correctly for me with the below

1- Convert from XLSX to XLS

2- Add incremental primary key at XLS sheet

2- Then save as text Unicode

3- Go to Microsoft SQL then right click on the database then import flat file

4- Convert data types to nvarchar(max) if need it

0

After importing the data from Excel you could change the float type to decimal and save the design of the table.

Then change decimal type to nvarchar and save the design again.

I have done this and it solved the problem for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.