Well, the first item about this problem, started in 2004 and still this is a problem in the year 2016. A collegae is testing an import from excel. I load the data in SQL with a SSIS package. I haven't tweak this yet. And the problem is this. The values:
text1
text2
tesx3
1
2
3
4
in a column is read as
NULL
NULL
NULL
1
2
3
4
I would expect that the Jet engine identified the column a text but it seems that the column is identified as integer and the text is ignored. I can see 'quotes in the column for the text and when i enter text it doesn't have a quote ('). What do you think?
Now how to solve this. Is there a best practice to solve this? I mention a couple of options:
- Convert it to csv and then import it?
- Create a template with couple of rows as text, hide them, delete them in import. Why is my import not working then because first lines are text?!
- Registry change and IMEX adjustment
- 1) Export the excel data sheet to a csv file, 2) Change the csv extension to txt, 3) Open the txt file in Excel and use the Import Wizard to change all columns to Text, 4) Now Save the file as a Normal excel file and import it using SSIS Import Wizard
Are there better or other options?
The solution is that I first export the data into XLS, I let users change this and then I import these files into SQL Server. So I've a certain degree of freedom in exporting the file..
Hennie