Loading Excel worksheet into SQL Server Db

QB

Board Regular
Joined
Jul 5, 2004
Messages
93
Hi

I'm loading a worksheet into a SQL Server database using DTS. We are experiencing 3 distinct types of error.

Firstly, rows are not loaded into the Db in the Excel row order. A workround is to insert a new Col A, set each active row's formula to =Row() and then sort in SQL Server by the first field. Does anyone know why this happens?

Secondly, SQL server does not recognise the data types when we have multiple text headers cells at the top of columns. Numerics are imported as <null> values. MSKB recommends forcing the data type by adding 10 rows at the top of the worksheet and filling the first 10 cells in each column with text or numerics according to the desired data type. This is all OK until you want to import a column of boolean values. Any ideas on what value we should use to force the cells to be interpreted as boolean.

Finally, occasionally numeric cells are rejected during the DTS load. The error message is that SQL cannot interpret the cell value. Excel recognises the cells as numeric and can use the value in calculations without any problem. Our workround is to convert formulae to values using Paste Special. Any ideas on why we are experiencing this problem.

Many thanks in advance for any help you can offer.

QB
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,148,530
Messages
5,747,234
Members
424,070
Latest member
smanni3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top