Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1050987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:51:26+00:00 2026-05-16T16:51:26+00:00

I’m trying to upload Excel (2003) file into Sql server 2005. At present we

  • 0

I’m trying to upload Excel (2003) file into Sql server 2005.

At present we are using SSIS to upload the file into a Temporary table (with defined schema) and then moving the data to their intended location using Stored procedure. This gives lots of errors due to datatype mismatch and sometimes null values are uploaded into table even though the excel file contains values.

Now I have the following options

Option 1 : (Suggested here)

Import the data into a table with all columns of Type varchar(255). Then have an SP validate the datatype of each column before moving it to live… Here again will it be a performance problem to use IsNumeric, len, IsDate etc ?

Option 2 : (XML / XSD)

Generate an XML out of the XL file and validate it against the predefined XSD before importing the xml through .NET or through SSIS. Will this way be slow compared to option 1? Will I be able to validate the length of the data too? Will I be able to report exactly which row and column caused the error?

From your opinion which is good on performance and other aspects… Particularly when there is a an error, I should be able to report to the user exactly which row and column caused the error.

If there is a better way to handle this… Please let me know…

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:51:26+00:00Added an answer on May 16, 2026 at 4:51 pm

    Though the previous two answers are perfectly valid, the way I did was little different, hence wanted to provide the way here…

    Step 1 : I genereated a Xml File from the Excel, using excel macro.

    Step 2 : Validated the same using a predefined XSD, in .NET (Windows App). The XSD contains all the schema information like data type and even the length, scale and precision of the data required.

    One more advantage here is that I can show the precise row and column in which the validation fails, so that user can correct it easily

    Step 3 : Uploading the XML file using SSIS in to a table, which confirms to the given schema.

    The disadvantages I found till now :

    1. The upload process is little slower as more operations are involved.
    2. Changing the DataType and length of even a single field takes 3 places to upload. (1 in the Schema, 2 in SSIS, 3 in Uploaded Table)

    This is the first time I’m trying this. It works fine till now and I was able to achieve what I wanted. There may be other disadvantages, that may surface over time. I will try to keep this post updated, when I face some.

    Thanks for all your help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to render a haml file in a javascript response like so:
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I am using Paperclip to handle profile photo uploads in my app. They upload
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.