Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using DTS to import data from an excel spreadsheet SQL version 2003 version 8.0

Posted on 2008-10-02
3
Medium Priority
?
631 Views
Last Modified: 2012-06-21
I've been using this spreadsheet for quite sometime, but with a different company.  I can't seem to get it to work now.  Please see attached error message and Excel file
DTS-Error-Message.doc
New-Prop-Template.xls
0
Comment
Question by:rhonlw83
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 32

Accepted Solution

by:
Brendt Hess earned 2000 total points
ID: 22638245
The Excel DTS import does not like certain fields where they contain all numbers, but the field is formatted as text.  I have found it easier to prepend on a single quote on any field containing numeric text to ensure that the DTS package succeeds.

Here is a snippet of Excel macro code that will ensure that the values in the cells will be treated as strings by the DTS import routines.  Try running it against that column, then run the import.  I believe your import will succeed.
Sub Textify()
'
' Select the last cell in the column that needs to be textified
' So, if data exists in column C, go to the last cell in that 
'   column with data in it, then run the macro. 
    Do
        If ActiveCell.Row = 1 Then Exit Do
        If Left(ActiveCell.FormulaR1C1, 1) <> "'" Then
            ActiveCell.FormulaR1C1 = "'" & ActiveCell.FormulaR1C1
        End If
        ActiveCell.Offset(-1, 0).Activate
    Loop
End Sub

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question