C# SQL Bulk Copy: Column returning "null" halfway

c# excel import null sqlbulkcopy

Question

When I am using SQL Bulk Copy, my columns return "null" halfway through the insert...

The only thing I can think of is because of special characters such as "/" and "-". Is it at all possible to escape chars in SQL bulk Copy?

I've tried looking it up, but no one seems to have to escape chars in SQL, any other solutions?

Entries from the excel sheet:(Removed all formulas prior to export)

enter image description here

After import to the database: (All Fields are VarChar(50))

From the DataBase

Accepted Answer

After looking into my excel sheet a little more, I realized that my fields were set to "General" and NOT as "Text".

Go to Home > Number > Select Dropdown to "Text" Problem Fixed.




Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why